/* Product Page Styles */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    --primary-color: #2d3436;
    --secondary-color: #636e72;
    --accent-color: #636e72;
    --success-color: #00b894;
    --warning-color: #636e72;
    --danger-color: #e17055;
    --dark-color: #2d3436;
    --light-color: #ddd;
    --gray-color: #636e72;
    --shadow-soft: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.12);
    --border-radius: 16px;
    --border-radius-lg: 24px;
}

body {
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* Premium Header */
.premium-header {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: static;
    transition: all 0.3s ease;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #6c757d;
}

.search-container {
    position: relative;
    max-width: 500px;
}

.premium-search {
    border: 2px solid #e9ecef;
    border-radius: 50px;
    padding: 12px 24px 12px 55px;
    font-size: 16px;
    transition: all 0.3s ease;
    width: 100%;
}

.premium-search:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(99, 110, 114, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 5;
    pointer-events: none;
    font-size: 18px;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-suggestion-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-suggestion-item:hover {
    background-color: #f8f9fa;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 2px;
}

.suggestion-brand {
    font-size: 12px;
    color: #6c757d;
}

.suggestion-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.dropdown-item.active {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
}

.action-buttons .btn {
    border-radius: 50px;
    padding: 12px 18px;
    margin: 0 6px;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
    background: white;
    color: #6c757d;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #f8f9fa;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.action-buttons .btn-primary {
    border: 2px solid var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

.action-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 110, 114, 0.3);
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.badge-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.catalog-btn {
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid #6c757d;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.catalog-btn:hover {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.catalog-btn.active {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* Categories Sidebar */
.categories-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    border-right: 1px solid #e9ecef;
    z-index: 1060;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.categories-sidebar.show {
    left: 0;
}

/* Sidebar backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1055;
    display: none;
}

.sidebar-backdrop.show {
    display: block;
}

.main-content-wrapper {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

.main-content-wrapper.sidebar-open {
    margin-left: 280px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: between;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

.sidebar-content {
    padding: 0;
}

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

.category-item {
    border-bottom: 1px solid #f1f3f4;
}

.category-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-link:hover {
    background: #f8f9fa;
    color: var(--secondary-color);
    padding-left: 25px;
}

.category-arrow {
    margin-right: 10px;
    font-size: 12px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.expand-arrow {
    font-size: 12px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.category-item.expanded .expand-arrow {
    transform: rotate(180deg);
}

.subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-item.expanded .subcategory-list {
    max-height: 500px;
}

.subcategory-item {
    border-bottom: 1px solid #e9ecef;
}

.subcategory-link {
    display: block;
    padding: 12px 20px 12px 50px;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.subcategory-link:hover {
    background: white;
    color: var(--primary-color);
    padding-left: 55px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1039;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 991px) {
    .main-content-wrapper.sidebar-open {
        margin-left: 0;
    }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
    .premium-header .row {
        row-gap: 15px;
    }
    
    .premium-header .order-2 {
        margin-top: 0;
    }
    
    .search-container {
        margin-top: 10px;
    }
    
    .action-buttons .btn {
        padding: 8px 12px;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .badge-notification {
        min-width: 18px;
        min-height: 18px;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }
    
    .catalog-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .action-buttons {
        gap: 8px;
    }
    
    .user-dropdown .btn,
    .dropdown .btn {
        padding: 8px 10px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Footer */
.premium-footer {
    background: #1a202c;
    color: white;
    padding: 60px 0 30px;
    margin-top: 4rem;
}

.footer-section h5 {
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #e2e8f0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 52, 54, 0.3);
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    padding-top: 30px;
    margin-top: 40px;
    text-align: center;
    color: #a0aec0;
}

/* Product specific styles */
.main-content {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.product-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    cursor: zoom-in;
}
.price-tag {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1rem;
}
.product-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}
.specifications-section {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.spec-category {
    border: 1px solid #dee2e6;
    border-radius: 0.4rem;
    margin-bottom: 1rem;
    overflow: hidden;
}
.spec-header {
    background: #636e72;
    color: white;
    padding: 0.6rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.spec-header i {
    color: white;
    font-size: 0.85rem;
}
.spec-content {
    padding: 0;
    background: white;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
}
.spec-row:hover {
    background-color: #f8f9fa;
}
.spec-row:last-child {
    border-bottom: none;
}
.spec-name {
    font-weight: 500;
    color: #636e72;
    flex: 1;
    font-size: 0.85rem;
}
.spec-value {
    color: #495057;
    text-align: right;
    font-weight: 500;
    flex: 0 0 auto;
    margin-left: 1rem;
    font-size: 0.85rem;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
}

/* Thumbnail styles */
.product-thumbnail {
    transition: all 0.2s ease;
    cursor: pointer;
}
.product-thumbnail:hover {
    border-color: #636e72 !important;
    transform: scale(1.05);
}
.product-thumbnail.active {
    border-color: #636e72 !important;
    border-width: 2px !important;
}

/* Fullscreen Gallery */
.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.fullscreen-gallery.show {
    display: flex;
}
.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.gallery-nav:hover {
    background: rgba(255,255,255,0.2);
}
.gallery-prev {
    left: 20px;
}
.gallery-next {
    right: 20px;
}
.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}
.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.9rem;
}

.variant-selector {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}
.key-specs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.key-spec-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.75rem;
    text-align: center;
    flex: 1;
    min-width: 100px;
}
.key-spec-icon {
    font-size: 1.25rem;
    color: #636e72;
    margin-bottom: 0.25rem;
}
.key-spec-label {
    font-weight: 500;
    color: #666;
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.key-spec-value {
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-primary {
    background: #636e72;
    border: 1px solid #636e72;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: #4a5458;
    border-color: #4a5458;
    transform: none;
}
.product-actions {
    margin-top: 2rem;
}

/* Favorites and Compare Buttons */
.add-to-favorites,
.remove-from-compare {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #636e72;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.add-to-favorites:hover,
.remove-from-compare:hover {
    background: #636e72;
    border-color: #636e72;
    color: white;
}

.add-to-favorites i,
.remove-from-compare i {
    font-size: 0.9rem;
}
.brand-badge {
    background: #636e72;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    border-bottom: 2px solid #636e72;
    padding-bottom: 0.5rem;
}
/* Variant selector styles similar to new.tab.md */
.variant-section {
    margin-bottom: 2rem;
}
.variant-label {
    font-weight: 500;
    color: #636e72;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}
.color-variants {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    position: relative;
}
.color-variant {
    position: relative;
    width: 60px;
    height: 60px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.color-variant:hover {
    border-color: #636e72;
    transform: none;
    box-shadow: none;
}
.color-variant.active {
    border-color: #636e72;
    border-width: 2px;
}
.color-variant img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.color-variant-name {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    text-align: center;
    width: 80px;
}

/* Style for colors from other memory configurations */
.color-variant.other-config {
    opacity: 0.7;
    border-style: dashed;
}
.color-variant.other-config:hover {
    opacity: 1;
    border-style: solid;
}
.color-variant-memory {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #666;
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

/* Add visual separator between same config and other config colors */
.color-variant:not(.other-config) ~ .color-variant.other-config:first-of-type {
    margin-left: 20px;
    position: relative;
}
.color-variant:not(.other-config) ~ .color-variant.other-config:first-of-type::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: #dee2e6;
}
.memory-variants {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.memory-variant {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #636e72;
    min-width: 100px;
    text-align: center;
}
.memory-variant:hover {
    border-color: #636e72;
    background: #e9ecef;
    color: #4a5458;
    text-decoration: none;
}
.memory-variant.active {
    background: #636e72;
    color: #fff;
    border-color: #636e72;
}
.memory-variant-text {
    font-weight: 500;
    font-size: 0.9rem;
}
.memory-variant-price {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Product Actions */
.add-to-cart-btn {
    background: #636e72;
    border: 1px solid #636e72;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.add-to-cart-btn:hover {
    background: #4a5458;
    border-color: #4a5458;
    transform: none;
}
.add-to-favorites-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #636e72;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.add-to-favorites-btn:hover {
    background: #636e72;
    border-color: #636e72;
    color: white;
}
.add-to-favorites-btn.active {
    background: #636e72;
    color: white;
    border-color: #636e72;
}
.add-to-compare-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #636e72;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.add-to-compare-btn:hover {
    background: #636e72;
    border-color: #636e72;
    color: white;
}
.add-to-compare-btn.active {
    background: #636e72;
    color: white;
    border-color: #636e72;
}

/* Action feedback */
.action-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}