/* ============================================
   DESIGN SYSTEM & CSS VARIABLES
   ============================================ */
:root {
    /* Color Palette */
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    --secondary-color: #f59e0b;
    --secondary-light: #fde68a;
    --accent-color: #0d9488;
    --accent-dark: #0f766e;
    --danger-color: #ef4444;
    --warning-color: #f97316;
    --success-color: #10b981;
    --info-color: #06b6d4;
    
    /* Neutral Colors */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --white: #ffffff;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 
                   'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
    --spacing-3xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-index */
    --z-sticky: 20;
    --z-modal: 1000;
    --z-tooltip: 1100;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    height: 80px;
}

header img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-base);
}

header img:hover {
    transform: scale(1.05);
}

header div {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

header #links {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    margin-right: var(--spacing-lg);
}

header a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

header a:hover {
    color: var(--primary-color);
}

/* Header Cart Icon */
header .cart {
    position: relative;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

header .cart:hover {
    background-color: var(--bg-light);
    transform: scale(1.1);
}

header .cart:hover i {
    color: var(--primary-color);
}

header .cart i {
    font-size: 1.4rem;
    color: var(--text-dark);
    transition: color var(--transition-base);
}

header .cart #cart-items {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
main {
    display: flex;
    flex-direction: row;
    /* Don't force-grow; let content define height */
    flex: 0 0 auto;
    width: 100%;
    /* Allow the page to shrink to content height */
    min-height: auto;
    overflow: visible;
}

/* Responsive fix for all card/grid/gallery layouts */
@media (max-width: 768px) {
    .photo-grid,
    .gallery,
    .card-grid,
    .photo-gallery {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100vw !important;
        min-height: 100vh;
        position: static !important;
    }
    .photo-card,
    .gallery-card,
    .card,
    .card-1,
    .card-2,
    .card-3,
    .card-4 {
        position: static !important;
        width: 90vw !important;
        max-width: 350px !important;
        height: auto !important;
        margin: 0 auto !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        transform: none !important;
        z-index: auto !important;
        top: auto !important;
        left: auto !important;
    }
    .photo-card img,
    .gallery-card img,
    .card img {
        height: auto !important;
        min-height: 180px;
        width: 100% !important;
        object-fit: cover;
    }
}

main.no-sidebar .filter-box {
    display: none;
}

main.no-sidebar #content {
    width: 100%;
}

/* ============================================
   SIDEBAR / FILTER BOX
   ============================================ */
.filter-box {
    width: 280px;
    min-width: 280px;
    padding: var(--spacing-xl);
    background-color: var(--bg-light);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    position: sticky;
    top: 80px;
    /* Allow sidebar to shrink to content; cap at viewport */
    max-height: calc(100vh - 80px);
    align-self: flex-start;
}

.filter-box h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    color: var(--text-dark);
}

.filter-box .form-floating {
    margin-bottom: var(--spacing-lg);
}

.filter-box label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.form-select,
.form-control,
.form-range {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-select:focus,
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-select {
    padding: var(--spacing-md);
    font-size: var(--font-size-sm);
    background-color: var(--white);
    color: var(--text-dark);
}

/* ============================================
   CONTENT AREA
   ============================================ */
#content {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: var(--bg-lighter);
    align-content: start;
    /* Let content height be driven by items */
    min-height: auto;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    padding: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #f3f4f6;
}

.product-card-image {
    width: 100%;
    height: 160px;
    background-color: #f9fafb;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.product-card-desc {
    font-size: 0.85rem;
    color: #6b7280;
    padding: 8px 12px;
    height: 48px;
    overflow: hidden;
    line-height: 1.4;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    padding: 8px 12px;
}

.product-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #f3f4f6;
}

.btn-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background-color: #10b981;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-cart:hover {
    background-color: #059669;
}

.btn-wishlist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #fff;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-wishlist:hover,
.btn-wishlist.active {
    background-color: #ef4444;
    color: #fff;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
}

.pagination span {
    color: #6b7280;
    font-size: 0.9rem;
}

.btn-page {
    padding: 8px 16px;
    background-color: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-page:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* Keep old classes for backward compatibility */
.product {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product h4 {
    font-size: 1rem;
    font-weight: 600;
    padding: 12px;
    margin: 0;
}

.product .photo {
    height: 160px;
    overflow: hidden;
}

.product .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    padding: 8px 12px;
}

.product .add-button {
    display: flex;
    gap: 8px;
    padding: 12px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    text-decoration: none;
    line-height: 1.4;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
    border: none;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-outline-danger {
    background-color: transparent;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--text-light);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--text-dark);
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--text-light);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background-color: #4338ca;
    color: var(--white);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-sm);
}

/* ============================================
   UTILITIES
   ============================================ */
.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.invisible {
    visibility: hidden;
}

/* ============================================
   FOOTER
   ============================================ */
.easyshop-footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-section strong {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
}

.footer-section h6 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.footer-section p {
    font-size: var(--font-size-sm);
    color: var(--text-lighter);
    margin: 0;
    line-height: 1.6;
}

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

.footer-links li {
    padding: var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
    color: var(--text-lighter);
}

.footer-links a {
    color: var(--text-lighter);
    text-decoration: none;
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom-bar {
    padding-top: var(--spacing-lg);
    text-align: center;
}

.footer-bottom-bar p {
    font-size: var(--font-size-sm);
    color: var(--text-lighter);
    margin: 0;
}

/* ============================================
   CART STYLES
   ============================================ */
.cart-page-wrapper {
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.cart-page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.cart-page-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cart-item .photo {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9fafb;
}

.cart-item .photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
}

.cart-item-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-quantity button:hover {
    background-color: #e5e7eb;
}

.cart-item-quantity span {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    color: #1f2937;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    white-space: nowrap;
}

.cart-item-actions button {
    padding: 0.5rem 1rem;
    background-color: #fff;
    color: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-item-actions button:hover {
    background-color: #ef4444;
    color: #fff;
}

/* Cart Summary */
.cart-summary-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

#order-summary {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#order-summary .summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

#order-summary .summary-item.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    border-bottom: none;
    padding-top: 1rem;
    margin-bottom: 1rem;
}

#order-summary .btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

#order-summary .btn-success {
    background-color: #10b981;
    color: #fff;
    border: none;
}

#order-summary .btn-success:hover {
    background-color: #059669;
}

#order-summary .btn-secondary {
    background-color: #6b7280;
    color: #fff;
    border: none;
}

#order-summary .btn-secondary:hover {
    background-color: #4b5563;
}

/* Empty Cart */
.empty-cart-message {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.empty-cart-message i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-cart-message h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.empty-cart-message p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.empty-cart-message .btn-primary {
    background-color: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
}

.empty-cart-message .btn-primary:hover {
    background-color: #1d4ed8;
}

/* ============================================
   WISHLIST STYLES
   ============================================ */
.wishlist-page-wrapper {
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.wishlist-page-header {
    margin-bottom: 2rem;
}

.wishlist-page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.wishlist-subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 0.95rem;
}

.wishlist-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wishlist-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1.25rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.wishlist-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #d1d5db;
}

.wishlist-item-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f9fafb;
}

.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.wishlist-item-image img:hover {
    transform: scale(1.05);
}

.wishlist-item-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wishlist-item-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
}

.wishlist-item-desc {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2563eb;
    margin-top: 0.5rem;
}

.wishlist-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wishlist-item-actions .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.wishlist-item-actions .btn-success {
    background-color: #10b981;
    color: #fff;
    border: none;
}

.wishlist-item-actions .btn-success:hover {
    background-color: #059669;
    transform: translateY(-1px);
}

.wishlist-item-actions .btn-outline-danger {
    background-color: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
}

.wishlist-item-actions .btn-outline-danger:hover {
    background-color: #ef4444;
    color: #fff;
}

/* Empty Wishlist */
.wishlist-empty {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.wishlist-empty h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.wishlist-empty p {
    color: #6b7280;
    margin: 0 0 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.wishlist-empty .btn {
    background-color: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.wishlist-empty .btn:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
}

/* Responsive Wishlist */
@media (max-width: 768px) {
    .wishlist-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .wishlist-item-image {
        width: 160px;
        height: 160px;
        margin: 0 auto;
    }
    
    .wishlist-item-details {
        align-items: center;
    }
    
    .wishlist-item-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Responsive Cart */
@media (max-width: 900px) {
    .cart-page-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary-section {
        position: static;
    }
}

@media (max-width: 600px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }
    
    .cart-item .photo {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-price {
        grid-column: 2;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-end;
    }
}

/* ============================================
   PROFILE PAGE STYLES
   ============================================ */
.content-form {
    display: flex !important;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    gap: 1.5rem;
}

.content-form h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #f9fafb;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.profile-summary img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* Form Controls - Bootstrap Floating Labels Override */
.content-form .form-floating {
    position: relative;
    margin-bottom: 0.5rem;
}

.content-form .form-floating > .form-control,
.content-form .form-floating > .form-select {
    width: 100%;
    height: 58px;
    padding: 1.625rem 0.75rem 0.625rem;
    font-size: 1rem;
    line-height: 1.25;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.content-form .form-floating > .form-control:focus,
.content-form .form-floating > .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.content-form .form-floating > .form-control:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
}

.content-form .form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 1rem 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: 1px solid transparent;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: #6b7280;
    font-size: 1rem;
}

/* When input has value or is focused, move label up */
.content-form .form-floating > .form-control:focus ~ label,
.content-form .form-floating > .form-control:not(:placeholder-shown) ~ label,
.content-form .form-floating > .form-select ~ label {
    opacity: 0.85;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #2563eb;
    background: linear-gradient(to bottom, transparent 50%, #fff 50%);
    height: auto;
    padding: 0 0.25rem;
}

.content-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
}

.content-form textarea.form-control {
    padding: 0.75rem;
    min-height: 80px;
    resize: vertical;
}

.content-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0;
}

.content-form .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #2563eb;
}

.content-form .form-check-label {
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

/* Profile Buttons */
.content-form .btn-primary {
    background-color: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.content-form .btn-primary:hover {
    background-color: #1d4ed8;
}

.content-form .btn-secondary {
    background-color: #6b7280;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.content-form .btn-secondary:hover {
    background-color: #4b5563;
}

/* Profile Progress Bar */
.content-form [id="profileProgress"] {
    transition: width 0.3s ease;
}

/* Grid layouts in profile */
.content-form > div[style*="grid"] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 1rem !important;
}

/* Responsive Profile */
@media (max-width: 768px) {
    .content-form {
        padding: 1rem;
    }
    
    .content-form > div[style*="grid"] {
        grid-template-columns: 1fr !important;
    }
    
    .profile-summary {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-floating {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.form-floating > label {
    position: absolute;
    top: 0;
    left: 0;
    padding: var(--spacing-md);
    pointer-events: none;
    transform-origin: 0 0;
    transition: opacity .1s ease-in-out, transform .1s ease-in-out;
    color: var(--text-light);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-dark);
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
}

.modal-dialog {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
    transition: color var(--transition-base);
}

.btn-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
}

/* ============================================
   ADMIN FORM STYLES
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group .form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all var(--transition-base);
}

.form-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-group textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-group select.form-control {
    cursor: pointer;
    background-color: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-check-label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-dark);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Admin table styling */
.table {
    background-color: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th {
    background-color: var(--bg-light);
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tr:hover {
    background-color: var(--bg-light);
}

.table .btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

/* Admin page section - ensure proper layout when rendered to main */
main > section {
    flex: 1;
    width: 100%;
    padding: var(--spacing-lg);
    background-color: var(--bg-lighter);
}

main > section h2 {
    margin: 0;
    color: var(--text-dark);
    font-size: var(--font-size-2xl);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .filter-box {
        width: 240px;
        min-width: 240px;
    }
    
    #content {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    header {
        padding: var(--spacing-md) var(--spacing-lg);
        height: auto;
        flex-wrap: wrap;
    }
    
    main {
        flex-direction: column;
        height: auto;
    }
    
    .filter-box {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        height: auto;
        max-height: 300px;
    }
    
    #content {
        height: auto;
        /* Avoid forcing extra space on small screens too */
        min-height: auto;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-dialog {
        margin: 0.5rem;
        max-height: 95vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    header #links {
        gap: var(--spacing-md);
    }
    
    #content {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }
    
    .product .add-button {
        flex-direction: column;
    }
}

/* ============================================
   APPLE-INSPIRED PERSONAL SITE THEME
   ============================================ */

.nav-container {
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

header {
    height: 44px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

header #links {
    display: flex !important;
    gap: 2rem !important;
    align-items: center !important;
    max-width: 1024px !important;
    width: 100% !important;
    padding: 0 22px !important;
    margin: 0 !important;
}

header #links a {
    color: rgba(0, 0, 0, 0.8) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: opacity 0.3s !important;
    opacity: 0.8 !important;
}

#links a:hover {
    opacity: 1;
}

.nav-logo {
    font-size: 18px !important;
}

.nav-icon {
    font-size: 14px !important;
}

/* Hero Sections */
.homepage-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

.hero {
    height: auto;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 55px;
    position: relative;
    overflow: hidden;
}

.dev-hero {
    background-color: #ffffff;
}

.photo-hero {
    background-color: #f5f5f7;
}

.hero-content {
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -0.005em;
    margin-bottom: 6px;
    color: #1d1d1f;
}

.hero-subtitle {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-apple-blue {
    background-color: #0071e3;
    color: white !important;
    padding: 8px 16px;
    border-radius: 980px;
    font-size: 17px;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-apple-blue:hover {
    background-color: #0077ed;
}

.btn-apple-link {
    color: #06c;
    font-size: 21px;
    text-decoration: none;
}

.btn-apple-link:hover {
    text-decoration: underline;
}

.hero-image-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-image {
    width: 100%;
    height: auto;
}

/* Photography text color adjustments if needed */
.photo-title {
    color: #1d1d1f;
}

.photo-subtitle {
    color: #1d1d1f;
}

/* Hide Easyshop UI elements that might interfere */
main {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    width: 100%;
}

main.no-sidebar {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure footer is clean */
#footer-placeholder {
    background: #f5f5f7;
    padding: 50px 0;
}


/* Footer Styles */
.apple-footer {
    background: #f5f5f7;
    color: rgba(0,0,0,0.56);
    padding: 20px 0 40px;
    font-size: 12px;
}

.footer-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

.footer-sections {
    display: flex;
    gap: 50px;
    margin-bottom: 20px;
}

.footer-column h6 {
    color: rgba(0,0,0,0.88);
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
}

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

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-legal {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 15px;
    margin-top: 15px;
}


/* Hero Image Fallbacks */
.hero-image-container {
    background: #fbfbfd;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    margin-top: 40px;
}

.hero-image:not([src]) {
    display: none;
}

