/* ====================================
   Hero Section
   ==================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-slider {
    position: relative;
    height: 480px;
    overflow: hidden;
}

.hero-slider .slider {
    position: relative;
    height: 100%;
}

.hero-slider .slides {
    position: relative;
    height: 100%;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.hero-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider .slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35));
    display: flex;
    align-items: center;
}

.hero-slider .slide-title {
    color: white;
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
}

.hero-slider .slider-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slider .slider-control:hover {
    background: rgba(0, 0, 0, 0.6);
}

.hero-slider .slider-control.prev {
    left: 16px;
}

.hero-slider .slider-control.next {
    right: 16px;
}

.hero-slider .slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-slider .dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.hero-slider .dot.active {
    background: white;
}

/* ====================================
   Cart Page
   ==================================== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
}

.cart-items-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden; /* Ensures rounded corners clip content */
}

/* Order Detail Card specific style */
.order-items-card {
    border: 1px solid var(--border-color);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0; /* Removed bottom margin as it's inside card */
}

.cart-table th,
.cart-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cart-table th {
    font-weight: var(--font-weight-semibold);
    background: var(--bg-light);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* Remove Icon - Desktop & Mobile shared base */
.cart-remove-btn {
    background: none;
    border: none;
    color: #000000;
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: var(--spacing-xs);
    opacity: 0.8;
}

.cart-remove-btn:hover {
    color: var(--error-color);
    opacity: 1;
}

/* Responsive Table */
@media (max-width: 768px) {
    .cart-items-card {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    
    .order-items-card {
        border: none;
    }

    .shipping-info-card {
        display: none;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--bg-white);
        border: none;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: none;
        position: relative;
    }

    .cart-table td {
        border: none;
        padding: 0;
        width: 100%;
    }

    /* Product Info (Row 1) */
    .product-cell {
        order: 1;
        margin-bottom: 1rem;
    }

    .product-info-wrapper {
        display: flex;
        gap: 1rem;
        align-items: flex-start;
        padding-right: 30px; /* Space for close icon */
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
        border-radius: var(--radius-sm);
    }

    .product-details {
        display: flex;
        flex-direction: column;
    }
    
    .product-details a {
        font-weight: var(--font-weight-bold);
        color: var(--text-dark);
        margin-bottom: 4px;
        line-height: 1.4;
    }

    /* Remove Icon (Top Right) */
    .remove-cell {
        position: absolute !important;
        top: 0.75rem;
        right: 0.75rem;
        width: auto !important;
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
        order: 0;
        z-index: 5;
    }
    
    .cart-remove-btn {
        display: block; /* Show icon on mobile */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 4px;
        color: var(--text-medium);
    }

    /* Common Styles for Data Rows */
    .price-cell,
    .quantity-cell,
    .total-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px dashed var(--border-color);
    }

    /* Labels via pseudo-element */
    .price-cell::before,
    .quantity-cell::before,
    .total-cell::before {
        content: attr(data-label);
        color: var(--text-medium);
        font-size: 0.95rem;
        font-weight: var(--font-weight-normal);
    }

    /* Price (Row 2) */
    .price-cell {
        order: 2;
        font-weight: var(--font-weight-medium);
        color: var(--text-medium);
        position: static; /* Reset absolute positioning from previous */
    }

    /* Quantity (Row 3) */
    .quantity-cell {
        order: 3;
    }
    
    .quantity-input {
        transform: scale(0.9); /* Slightly smaller control */
        transform-origin: right center;
    }

    /* Subtotal (Row 4) */
    .total-cell {
        order: 4;
        border-bottom: none; /* No border for last item */
        padding-bottom: 0;
    }
    
    .total-cell strong {
        color: var(--primary-color);
        font-size: 1.1rem;
    }
}

.cart-summary {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.summary-total {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border-color);
}

/* ====================================
   Checkout Page
   ==================================== */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-2xl);
}

.checkout-form {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

/* ====================================
   Order Detail Page
   ==================================== */
.order-detail-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .order-detail-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

.order-summary {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-sm);
}

.order-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.order-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* ====================================
   Product Detail Page
   ==================================== */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    width: calc(100% - var(--spacing-2xl));
    max-width: 1280px;
    margin: var(--spacing-lg) auto;
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        margin-top: var(--spacing-md);
        width: calc(100% - var(--spacing-lg));
    }
}

.product-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.gallery-main {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-gray);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.thumbnail {
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info h1 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.product-sku {
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
}

.product-description {
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

.variant-selector {
    margin-bottom: var(--spacing-lg);
}

.variant-options {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.variant-option {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.variant-option:hover {
    border-color: var(--primary-color);
}

.variant-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.plan-selector {
    margin-bottom: var(--spacing-lg);
}

.plan-options {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.plan-option {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-option:hover {
    border-color: var(--primary-color);
}

.plan-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.plan-option.selected .plan-price,
.plan-option.selected .plan-interval {
    color: white !important;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.quantity-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background var(--transition-fast);
}

.quantity-btn:hover {
    background: var(--bg-gray);
}

.quantity-value {
    width: 60px;
    text-align: center;
    font-weight: var(--font-weight-semibold);
}

/* ====================================
   Reviews & Description
   ==================================== */
.product-description-section,
.reviews-section {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: var(--spacing-lg) auto;
    width: calc(100% - var(--spacing-2xl));
    max-width: 1280px;
}

@media (max-width: 992px) {
    .product-description-section,
    .reviews-section {
        margin: var(--spacing-md) auto;
        width: calc(100% - var(--spacing-lg));
    }
}

.review-card {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.review-rating {
    color: var(--accent-color);
}

.review-author {
    font-weight: var(--font-weight-semibold);
}

.review-date {
    color: var(--text-medium);
    font-size: 0.875rem;
}

/* ====================================
   Filters Sidebar
   ==================================== */
.filters-sidebar {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: var(--spacing-xl);
}

.filter-title {
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ====================================
   Shop Page Layout (Redesign)
   ==================================== */
.page-header {
    margin-bottom: var(--spacing-lg);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xs);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-xs);
}

.breadcrumb a {
    color: var(--text-medium);
}

.breadcrumb .separator {
    color: var(--text-light);
}

.page-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-dark);
}

.mobile-controls {
    display: none; /* Hidden on desktop */
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.control-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-dark);
    cursor: pointer;
    padding: var(--spacing-xs) 0;
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-xl);
}

.mobile-only {
    display: none;
}

/* ====================================
   Product Card Redesign (Scoped to Shop Layout)
   ==================================== */
.shop-layout .product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #F3F4F6;
    padding: var(--spacing-xs);
}

.product-image-wrapper {
    position: relative;
    padding-top: 56.25%; /* Aspect ratio 16:9 */
    background: #F9FAFB;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.shop-layout .product-image {
    position: absolute;
    inset: 0;
}

.shop-layout .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badges {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.badge-discount {
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-hot {
    background: #F59E0B;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-popular {
    background: #FBBF24;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.badge-best-deal {
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.shop-layout .product-info {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shop-layout .product-name {
    font-size: 0.95rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 4px;
    line-height: 1.3;
}

.shop-layout .product-category {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.shop-layout .product-rating {
    color: #FBBF24; /* Gold */
    font-size: 0.9rem;
    margin-bottom: 4px;
    letter-spacing: -2px;
}

.shop-layout .product-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: var(--font-weight-medium);
}

.in-stock {
    color: #10B981; /* Green */
}

.shop-layout .product-price {
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-layout .price-original {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 0.85rem;
}

.shop-layout .price-current {
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    color: #2563EB; /* Blue */
}

/*.shop-layout .btn-add-cart {
    margin-top: auto;
    width: 100%;
    background: #2563EB;
    color: white;
    padding: 8px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.shop-layout .btn-add-cart:hover {
    background: #1D4ED8;
}*/

.shop-layout .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

@media (min-width: 1200px) {
    .shop-layout .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ====================================
   Responsive Overrides
   ==================================== */
@media (max-width: 992px) {
    .product-detail-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .product-gallery,
    .cart-summary,
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .cart-table {
        font-size: 0.875rem;
    }

    .cart-item-image {
        width: 60px;
        height: 60px;
    }

    .hero-slider {
        height: 280px;
    }

    .hero-slider .slide-title {
        font-size: 1.5rem;
    }

    /* Mobile Shop Layout */
    .shop-layout {
        display: block;
    }

    .mobile-controls {
        display: flex;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        height: 100%;
    }

    .filters-sidebar.active {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-sm);
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-only {
        display: block;
    }

    .close-sidebar {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .shop-layout .products-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .shop-layout .product-card {
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }

    .shop-layout .product-info {
        padding: var(--spacing-sm);
    }

    .shop-layout .product-name {
        font-size: 0.9rem;
    }

    .shop-layout .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
/*    .shop-layout .btn-add-cart {
        padding: 6px;
        font-size: 0.8rem;
        white-space: nowrap;
    }*/
}

/* ====================================
   Profile Page
   ==================================== */
.profile-container {
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-2xl);
}

.profile-page-title {
    font-size: 2rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xl);
    color: var(--text-dark);
}

.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: 100px;
}

.profile-nav {
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    color: var(--text-medium);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
}

.profile-nav-link i {
    width: 20px;
    text-align: center;
}

.profile-nav-link:hover {
    background: var(--bg-gray);
    color: var(--primary-color);
}

.profile-nav-link.active {
    background: var(--primary-color);
    color: white;
}

.profile-nav-link.logout {
    color: var(--error-color);
    margin-top: var(--spacing-xs);
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.profile-nav-link.logout:hover {
    background: #FEE2E2;
    color: #DC2626;
}

.profile-content {
    background: var(--bg-white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.profile-section-title {
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.profile-form .form-group {
    margin-bottom: var(--spacing-lg);
}

.profile-form .btn-save {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

/* Profile Header Avatar */
.profile-header-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

/* Custom File Upload */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all var(--transition-fast);
}

.file-upload-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-gray);
}

.file-name {
    color: var(--text-medium);
    font-size: 0.9rem;
}

.current-avatar {
    margin-top: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    width: fit-content;
}

.avatar-preview-small {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* Toggle Switch */
.toggle-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: var(--spacing-md);
}

.toggle-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 26px;
    background-color: var(--border-color);
    border-radius: 34px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.label-text {
    font-weight: var(--font-weight-medium);
    color: var(--text-dark);
}

.text-muted {
    color: var(--text-medium);
    font-size: 0.85rem;
}

/* Responsive Profile */
.btn-logout-mobile {
    display: none;
    margin-top: var(--spacing-md);
    width: 100%;
    text-align: center;
    padding: var(--spacing-md);
    border: 1px solid var(--error-color);
    color: var(--error-color);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-medium);
    background: transparent;
    transition: all var(--transition-fast);
}

.btn-logout-mobile:hover {
    background: var(--error-color);
    color: white;
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .profile-sidebar {
        position: static;
    }

    .profile-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
        /* Hide scrollbar */
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    
    .profile-nav::-webkit-scrollbar { 
        display: none; 
    }

    .profile-nav-link {
        white-space: nowrap;
        padding: var(--spacing-sm) var(--spacing-md);
        flex: 1;
        justify-content: center;
        background: var(--bg-gray);
        border-radius: var(--radius-md);
    }

    .profile-nav-link i {
        display: none;
    }
    
    .profile-nav-link.active {
        background: var(--primary-color);
    }

    /* Hide the original logout link in nav on mobile */
    .profile-nav-link.logout {
        display: none;
    }
    
    /* Show the new logout button in form on mobile */
    .btn-logout-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .profile-container {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .profile-nav {
        flex-wrap: nowrap; /* Keep horizontal scroll */
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .profile-content {
        padding: var(--spacing-lg);
    }
}
