/* ============================================================
   XOneShopNet — Theme System v3 (BASE)
   Spoločné `.storefront-*` selektory a responsive tweaky.
   Per-theme štýly v themes/{name}.css.
   Plán 035 task 04 — extracted z themes.css riadky 1-649 + 1862-1888.
   ============================================================ */

/* ----------------------------------------------------------
   BASE — spoločné pravidlá pre všetky témy
   ---------------------------------------------------------- */

/* Nav */
.storefront-nav {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
}

.storefront-nav-inner {
    display: flex;
    align-items: center;
    height: 3.5rem;
    padding: 0 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
    gap: 1.25rem;
}

.storefront-logo {
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.storefront-logo-img {
    height: 2rem;
    max-width: 140px;
    object-fit: contain;
}

.storefront-nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.storefront-nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.storefront-nav-link {
    font-size: 0.875rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s, opacity 0.2s;
}

.storefront-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    padding: 0 0.35rem;
    margin-left: 0.25rem;
    line-height: 1;
}

/* Hamburger */
.storefront-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.storefront-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.storefront-mobile-menu {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1.5rem 1rem;
    gap: 0.25rem;
}

.storefront-mobile-menu.open {
    display: flex;
}

.storefront-mobile-link {
    display: block;
    padding: 0.625rem 0;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

@media (max-width: 767px) {
    .storefront-nav-links { display: none; }
    .storefront-hamburger { display: flex; }
}

/* Hero */
.storefront-hero {
    text-align: center;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

.storefront-hero-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.storefront-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.storefront-hero-content {
    position: relative;
    z-index: 2;
}

.storefront-hero-with-image .storefront-hero-title,
.storefront-hero-with-image .storefront-hero-desc {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.storefront-hero-title {
    margin: 0 0 0.5rem;
}

.storefront-hero-desc {
    margin: 0 auto 1.75rem;
    max-width: 560px;
}

.storefront-hero-cta {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.storefront-hero-cta:hover {
    transform: translateY(-1px);
}

/* Products Section */
.storefront-products-section {
    padding: 2.5rem 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
}

.storefront-section-title {
    text-align: center;
    margin: 0 0 1.5rem;
}

.storefront-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .storefront-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .storefront-products-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
    .storefront-products-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Cards */
.storefront-card {
    display: block;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.storefront-card-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.storefront-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.storefront-card:hover .storefront-card-image img {
    transform: scale(1.05);
}

.storefront-card-placeholder {
    font-size: 2.5rem;
    opacity: 0.3;
}

.storefront-card-body {
    padding: 0.75rem;
}

.storefront-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.storefront-card-pricing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.storefront-card-price {
    font-weight: 700;
}

.storefront-card-price-old {
    font-size: 0.8rem;
    text-decoration: line-through;
    opacity: 0.5;
}

.storefront-card-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    line-height: 1.3;
}

.storefront-card-soldout {
    display: block;
    width: 100%;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* View All */
.storefront-view-all {
    margin-top: 1.5rem;
    text-align: center;
}

.storefront-view-all-link {
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
}
.storefront-view-all-link:hover {
    text-decoration: underline;
}

.storefront-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

/* Listing (products page) */
.storefront-listing {
    padding: 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
}

.storefront-listing-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .storefront-listing-layout {
        flex-direction: row;
    }
}

.storefront-sidebar {
    width: 100%;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .storefront-sidebar { width: 18rem; }
}

.storefront-sidebar-box {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    margin-bottom: 1rem;
}

.storefront-sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.storefront-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.storefront-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.storefront-search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
}
.storefront-search-btn:hover { color: #4b5563; }

.storefront-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.storefront-category-list li { margin-bottom: 0.125rem; }

.storefront-category-link {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    text-decoration: none;
    color: #6b7280;
    transition: background 0.15s, color 0.15s;
}
.storefront-category-link:hover {
    background: #f9fafb;
    color: #374151;
}
.storefront-category-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.storefront-category-parent {
    display: block;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 0.5rem;
}

.storefront-category-count {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.storefront-subcategory-list {
    list-style: none;
    padding: 0 0 0 0.5rem;
    margin: 0;
}

.storefront-sort-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
}

.storefront-listing-main { flex: 1; min-width: 0; }

.storefront-listing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.storefront-listing-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.storefront-clear-filters {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
}
.storefront-clear-filters:hover { color: #374151; }

.storefront-products-grid-listing {
    grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
    .storefront-products-grid-listing { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
    .storefront-products-grid-listing { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) {
    .storefront-products-grid-listing { grid-template-columns: repeat(5, 1fr); }
}

/* Pagination */
.storefront-pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.storefront-page-link {
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #4b5563;
    background: #fff;
    transition: background 0.15s, color 0.15s;
}
.storefront-page-link:hover {
    background: #f9fafb;
}

.storefront-page-dots {
    padding: 0 0.25rem;
    color: #9ca3af;
}

/* Product Detail */
.storefront-detail {
    padding: 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
}

.storefront-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
.storefront-breadcrumb a {
    text-decoration: none;
    color: #6b7280;
}
.storefront-breadcrumb a:hover { text-decoration: underline; }
.storefront-breadcrumb-sep {
    margin: 0 0.5rem;
    color: #d1d5db;
}
.storefront-breadcrumb-current {
    color: #111827;
}

.storefront-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .storefront-detail-grid { grid-template-columns: 1fr 1fr; }
}

.storefront-detail-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.storefront-detail-pricing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.storefront-detail-price {
    font-size: 1.875rem;
    font-weight: 700;
}

.storefront-detail-price-old {
    font-size: 1.125rem;
    text-decoration: line-through;
    opacity: 0.5;
}

.storefront-detail-btn {
    display: block;
    width: 100%;
    color: #fff;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.storefront-detail-btn:hover {
    transform: translateY(-1px);
}
.storefront-detail-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Shop Name (v nav vedľa loga) */
.storefront-shop-name {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Page Banner (podstránky) */
.storefront-page-banner {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.storefront-page-banner-title {
    margin: 0;
    font-weight: 700;
}

/* Cookie Popup */
.storefront-cookie-banner {
    background: #fff;
    border-color: #e5e7eb;
}
.storefront-cookie-title { color: #111827; }
.storefront-cookie-text { color: #4b5563; }
.storefront-cookie-link { color: #2563eb; text-decoration: none; }
.storefront-cookie-link:hover { text-decoration: underline; }
.storefront-cookie-dismiss { color: #6b7280; background: none; border: none; cursor: pointer; }
.storefront-cookie-dismiss:hover { color: #374151; background: #f3f4f6; }

/* Footer — centrovaná */
.storefront-footer {
    width: 100%;
    margin-top: auto;
}

.storefront-footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
}

.storefront-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.storefront-footer-link {
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.storefront-footer-text {
    font-size: 0.875rem;
    margin: 0 0 0.25rem;
}

.storefront-footer-credit {
    font-size: 0.75rem;
    margin: 0;
}
.storefront-footer-credit a {
    text-decoration: none;
}
.storefront-footer-credit a:hover {
    text-decoration: underline;
}


/* ==============================================================
   RESPONSIVE TWEAKS
   Univerzálne pravidlá platné pre všetky témy.
   `.theme-bold` a `.theme-editorial` overrides v príslušných themes/*.css
   ============================================================== */

@media (max-width: 767px) {
    .storefront-hero { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .storefront-hero-content { width: 100%; }
}

@media (min-width: 768px) {
    .storefront-hero { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
    .storefront-hero-content { width: 100%; }
}

@media (max-width: 640px) {
    .storefront-hero-title { font-size: 1.75rem !important; }
    .storefront-page-banner-title { font-size: 1.5rem !important; }
    .storefront-page-banner { padding: 2rem 1rem !important; }
    .storefront-shop-name { font-size: 1rem !important; }
    .storefront-nav-inner { padding: 0 1rem; gap: 0.75rem; }
    .storefront-footer-inner { padding: 1.5rem 1rem; }
    .storefront-products-section { padding: 1.5rem 1rem; }
    .storefront-listing { padding: 1rem; }
    .storefront-detail { padding: 1rem; }
}
