:root {
    --accent: #5d25ff;
    --accent-glow: rgba(93, 37, 255, 0.4);
    --accent2: #00f2ff;
    --accent2-glow: rgba(0, 242, 255, 0.3);
    --bg-dark: #05070a;
    --card-bg: rgba(13, 17, 23, 0.7);
    --text: #e1e7ef;
    --muted: #8b9bb4;
    --border: rgba(56,189,248,0.1);
}

.max-width-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.shop-container {
    background: var(--bg-dark);
    min-height: 100vh;
    padding: 2rem 0;
    color: var(--text);
    width: 100%;
}

/* Header & Cart Redesign */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.shop-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.accent-text { color: var(--accent2); text-shadow: 0 0 15px var(--accent2-glow); }

.cart-trigger-wrapper {
    position: relative;
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-trigger-wrapper:hover {
    border-color: var(--accent2);
    box-shadow: 0 0 20px var(--accent2-glow);
    transform: translateY(-3px);
}

.cart-icon-cyber {
    font-size: 1.5rem;
    color: var(--accent2);
}

.cart-badge-new {
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: 900;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px var(--accent-glow);
}

.shop-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.sidebar-block {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--accent2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sidebar-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: var(--accent2);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent2-glow);
}

.filter-list { list-style: none; padding: 0; }
.filter-list a {
    display: flex; justify-content: space-between; padding: 0.8rem 1rem; color: var(--muted);
    text-decoration: none; border-radius: 0.75rem; transition: 0.3s;
    font-size: 0.9rem; margin-bottom: 0.25rem;
}
.filter-list a:hover, .filter-list a.active { 
    background: rgba(93, 37, 255, 0.15) !important; 
    color: var(--accent2) !important; 
    box-shadow: inset 0 0 15px rgba(0, 242, 255, 0.1) !important;
}

.search-wrapper { display: flex; flex-direction: column; gap: 1rem; }
#shop-search {
    width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: #fff; padding: 1rem 1.25rem; border-radius: 0.75rem; outline: none;
    font-size: 0.95rem; transition: 0.3s;
}
#shop-search:focus { border-color: var(--accent2); box-shadow: 0 0 20px var(--accent2-glow); }

#search-btn {
    background: var(--accent); color: #fff; border: none; border-radius: 0.75rem;
    width: 100%; height: 48px; cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px var(--accent-glow);
}
#search-btn::after { content: 'Rechercher'; }
#search-btn:hover { background: var(--accent2); color: #000; transform: translateY(-2px); box-shadow: 0 0 20px var(--accent2-glow); }

.cyber-select { display: none; }

.custom-select-wrapper { position: relative; user-select: none; }
.custom-select-trigger {
    width: 100%; background: rgba(255,255,255,0.03); border: 1px solid var(--border);
    color: #fff; padding: 1rem 1.25rem; border-radius: 0.75rem; 
    font-size: 0.95rem; cursor: pointer; transition: 0.3s;
    display: flex; justify-content: space-between; align-items: center;
}
.custom-select-trigger:hover { border-color: var(--accent2); box-shadow: 0 0 15px var(--accent2-glow); }
.custom-select-trigger::after {
    content: ''; width: 0; height: 0; border-left: 5px solid transparent;
    border-right: 5px solid transparent; border-top: 5px solid var(--accent2);
    transition: 0.3s;
}
.custom-select-wrapper.open .custom-select-trigger::after { transform: rotate(180deg); }

.custom-options {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #0d1117; border: 1px solid var(--accent2); border-radius: 0.75rem;
    overflow: hidden; visibility: hidden; opacity: 0; transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1); z-index: 5000;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9), 0 0 20px rgba(0, 242, 255, 0.1);
}
.custom-select-wrapper.open .custom-options { visibility: visible; opacity: 1; transform: translateY(0); z-index: 10; position: relative; }

.custom-option {
    padding: 1rem 1.25rem; color: var(--muted); cursor: pointer; transition: 0.3s;
    font-size: 0.95rem; border-bottom: 1px solid rgba(255,255,255,0.02);
}
.custom-option:last-child { border-bottom: none; }
.custom-option:hover { background: rgba(93, 37, 255, 0.2); color: var(--accent2); }
.custom-option.selected { color: var(--accent2); background: rgba(0, 242, 255, 0.08); font-weight: 800; }

.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card-modern {
    background: var(--card-bg); border: 1px solid var(--border);
    border-radius: 1.5rem; overflow: hidden; display: flex; flex-direction: column;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); position: relative;
}
.product-badge {
    position: absolute; top: 1rem; right: 1rem;
    padding: 0.5rem 1rem; border-radius: 2rem;
    font-size: 0.75rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.05em;
    z-index: 5; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1);
}

.product-badge.digital {
    border-color: var(--muted);
    color: var(--text);
}

.product-badge.out-of-stock {
    background: #ff3e3e !important;
    color: #fff !important;
    border-color: #ff3e3e !important;
    box-shadow: 0 0 15px rgba(255, 62, 62, 0.6);
}

.product-card-modern:hover { transform: translateY(-8px); border-color: var(--accent2); box-shadow: 0 20px 40px rgba(0,0,0,0.6); }

.product-image-wrapper { background: #fff; position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img { max-width: 80%; max-height: 80%; object-fit: contain; transition: 0.5s; }
.product-card-modern:hover .product-img { transform: scale(1.1); }

.product-details { padding: 1rem 1.25rem; flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.product-name { font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.4; height: 3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }

.product-meta { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.product-price-modern { font-size: 1.8rem; font-weight: 950; color: var(--accent2); }

.product-card-actions {
    margin-top: 1rem;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.product-action-btn {
    padding: 0.75rem 0.5rem; background: var(--accent);
    color: #fff; border: none; border-radius: 0.75rem; cursor: pointer;
    text-align: center; font-weight: 800; text-decoration: none; text-transform: uppercase;
    letter-spacing: 0.05em; font-size: 0.75rem; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; justify-content: center; gap: 6px; flex: 1; min-width: 0;
}
.product-action-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-action-btn i { font-size: 0.85rem; }
.product-action-btn:hover { background: var(--accent2); color: #000; transform: scale(1.03); box-shadow: 0 0 20px var(--accent2-glow); }
.product-action-btn.agency-buy { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.product-action-btn.agency-buy:hover { box-shadow: 0 0 20px var(--accent2-glow); }

.view-product-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: #fff !important;
    flex: 0.8;
}
.view-product-btn:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px var(--accent-glow) !important;
}

/* Pagination Modern */
.shop-pagination-modern { margin-top: 4rem; display: flex; justify-content: center; }
.pagination-container { display: flex; gap: 0.75rem; background: rgba(255, 255, 255, 0.03); padding: 0.5rem; border-radius: 1.25rem; border: 1px solid var(--border); backdrop-filter: blur(10px); }
.page-link {
    width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent; border-radius: 0.8rem;
    color: var(--muted); font-weight: 800; font-size: 1rem; cursor: pointer; transition: 0.3s;
}
.page-link:hover { background: rgba(255, 255, 255, 0.05); color: #fff; border-color: var(--border); }
.page-link.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

/* Premium Modal Overhaul */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(5, 7, 10, 0.9); backdrop-filter: blur(15px);
    display: flex; align-items: center; justify-content: center; z-index: 10000;
    opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 2rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: #0d1117; border: 1px solid var(--border); border-radius: 2.5rem;
    width: 95%; max-width: 1100px; max-height: 90vh;
    overflow-x: hidden; overflow-y: auto; position: relative;
    box-shadow: 0 0 100px rgba(0,0,0,1), 0 0 40px var(--accent-glow);
    transform: translateY(30px); opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}
.modal-overlay.active .modal-content { transform: translateY(0); opacity: 1; }

.modal-inner-grid { display: grid; grid-template-columns: 450px 1fr; width: 100%; height: 85vh; min-height: 600px; }

.modal-sidebar-cart {
    background: rgba(255, 255, 255, 0.02); border-right: 1px solid var(--border);
    padding: 2.5rem; overflow-y: auto; display: flex; flex-direction: column;
}

.modal-main-form { padding: 2.5rem; overflow-y: auto; background: #0d1117; }

.modal-header-premium { margin-bottom: 2rem; }
.modal-header-premium h2 {
    font-size: 1.75rem; font-weight: 800; color: #fff; text-transform: uppercase;
    letter-spacing: 0.1em; display: flex; align-items: center; gap: 1rem;
}
.modal-header-premium h2::before { content: ''; width: 5px; height: 24px; background: var(--accent2); border-radius: 3px; box-shadow: 0 0 10px var(--accent2-glow); }

/* Product Details Modal */
.product-modal-grid { display: grid; grid-template-columns: 1fr 1.2fr; min-height: 500px; }
.product-modal-image-col { background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem; border-radius: 12px; }
.product-modal-image-col .main-product-img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; transition: 0.3s; padding: 1rem; }

.product-modal-thumbnails {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail-item {
    width: 60px;
    height: 60px;
    border: 2px solid #eee;
    border-radius: 0.5rem;
    padding: 2px;
    cursor: pointer;
    transition: 0.3s;
    background: #fff;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.thumbnail-item:hover {
    border-color: var(--accent2);
}

.thumbnail-item.active-thumb {
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.product-modal-info-col { padding: 3rem; display: flex; flex-direction: column; gap: 1.25rem; background: #0d1117; border-left: 1px solid var(--border); }
.product-modal-info-col .product-action-btn { 
    flex: none; 
    height: 56px; 
    font-size: 1rem; 
    border-radius: 12px;
    margin-top: 1rem;
}
.prod-modal-title { font-size: 2rem; font-weight: 900; color: #fff; text-transform: uppercase; line-height: 1.1; margin: 0; }
.prod-modal-price { font-size: 1.8rem; font-weight: 800; color: var(--accent2); text-shadow: 0 0 10px var(--accent2-glow); }
.prod-modal-desc { font-size: 1.05rem; line-height: 1.6; color: var(--muted); margin: 0.5rem 0; overflow-y: auto; max-height: 200px; }

/* Post-Add Confirmation */
.post-add-modal { padding: 4rem; text-align: center; max-width: 500px; }
.post-add-icon { width: 80px; height: 80px; background: rgba(0, 242, 255, 0.1); border: 1px solid var(--accent2); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 2rem; color: var(--accent2); font-size: 2.5rem; box-shadow: 0 0 30px var(--accent2-glow); }
.post-add-title { font-size: 1.75rem; font-weight: 900; color: #fff; margin-bottom: 1rem; text-transform: uppercase; }
.post-add-subtitle { color: var(--muted); font-size: 1.1rem; }
.post-add-actions { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.5rem; }
.btn-cyber-outline { padding: 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: transparent; color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: 0.3s; }
.btn-cyber-outline:hover { border-color: var(--accent2); color: var(--accent2); box-shadow: 0 0 20px var(--accent2-glow); }
.btn-cyber-primary { padding: 1.25rem; background: var(--accent); color: #fff; border: none; border-radius: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: 0.3s; }
.btn-cyber-primary:hover { background: var(--accent2); color: #000; box-shadow: 0 0 20px var(--accent2-glow); }

.cart-list-premium { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.cart-item-modern {
    display: flex; gap: 1.25rem; align-items: center; padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 1.25rem;
    transition: 0.3s;
}
.cart-item-modern:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--accent2); }

.cart-item-thumb { width: 80px; height: 80px; background: #fff; border-radius: 1rem; padding: 10px; flex-shrink: 0; }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: contain; }

.cart-item-name { font-size: 1.1rem; font-weight: 800; color: #fff; margin-bottom: 0.85rem; line-height: 1.2; }
.cart-item-controls-row { display: flex; align-items: center; gap: 1.25rem; }

.remove-item-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.remove-item-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent2);
    color: var(--accent2);
    box-shadow: 0 0 15px var(--accent2-glow);
    transform: rotate(90deg);
}

.quantity-controls-modern {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 2px;
    height: 38px;
}

.qty-btn-modern {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    border-radius: 0.5rem;
}

.qty-btn-modern:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent2);
}

.qty-btn-modern.disabled {
    opacity: 0.2;
    cursor: not-allowed;
    pointer-events: none;
}

.qty-val-modern {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    min-width: 30px;
    text-align: center;
}

.cart-item-price-tag {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: var(--muted);
    white-space: nowrap;
    height: 38px; /* Sync with qty controls height */
}

.price-multiply {
    font-size: 1rem;
    opacity: 0.4;
    font-weight: 400;
    margin-top: -2px; /* Slight adjustment for optical centering */
}

.price-amount {
    color: var(--accent2);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.cart-total-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 0.5rem; }
.total-row { display: flex; justify-content: space-between; align-items: center; }
.total-label { font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.total-value-sub, .total-value-shipping { font-size: 1.25rem; font-weight: 700; color: #fff; }
.grand-total { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); }
.total-value-main { font-size: 2.5rem; font-weight: 950; color: var(--accent2); text-shadow: 0 0 20px var(--accent2-glow); }

.checkout-section-title { font-size: 0.9rem; font-weight: 800; color: var(--muted); text-transform: uppercase; margin: 2rem 0 1.5rem; display: flex; align-items: center; letter-spacing: 0.1em; }
.checkout-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); margin-left: 1.5rem; }
.checkout-section-title:first-child { margin-top: 0; }

.form-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group-premium { margin-bottom: 1.5rem; }
.form-group-premium label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.75rem; font-weight: 700; text-transform: uppercase; }
.form-group-premium input { width: 100%; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--border); border-radius: 1rem; padding: 1.1rem 1.5rem; color: #fff; font-size: 1rem; transition: 0.3s; }
.form-group-premium input:focus { border-color: var(--accent2); background: rgba(255, 255, 255, 0.05); box-shadow: 0 0 20px var(--accent2-glow); outline: none; }

.modal-close-premium {
    position: absolute; top: 2rem; right: 2rem; width: 45px; height: 45px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; z-index: 10; font-size: 1.5rem;
}
.modal-close-premium:hover { background: #ff416c; border-color: #ff416c; transform: rotate(90deg); }

.cyber-terminal {
    background: #000; border: 1px solid var(--accent2); border-radius: 1rem;
    padding: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--accent2);
    height: 150px; overflow-y: auto; margin-top: 2rem; display: none; box-shadow: inset 0 0 20px rgba(0, 242, 255, 0.1);
}
.cyber-terminal.active { display: block; }
.terminal-line { margin-bottom: 0.5rem; }
.terminal-line.success { color: #00ff88; }

.snackbar-container { position: fixed; top: 3rem; left: 50%; transform: translateX(-50%); z-index: 3001; }
.cyber-snackbar {
    background: var(--accent2); color: #000; padding: 1.25rem 2.5rem; border-radius: 1rem;
    font-weight: 900; box-shadow: 0 15px 40px var(--accent2-glow); text-transform: uppercase;
    transform: translateY(-100px); opacity: 0; transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}
.cyber-snackbar.active { transform: translateY(0); opacity: 1; }

/* Skeleton Loading */
.skeleton-card {
    pointer-events: none;
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: var(--border) !important;
    padding: 1.5rem;
    gap: 1rem;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    height: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.skeleton-text.title { width: 80%; height: 1.25rem; }
.skeleton-text.price { width: 40%; }
.skeleton-button {
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.skeleton-image::after, .skeleton-text::after, .skeleton-button::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(93, 37, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Empty State */
.empty-state-card {
    grid-column: 1 / -1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.empty-state-card p { font-size: 1.1rem; color: var(--muted); }
.btn-reset {
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 2.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-reset:hover {
    background: var(--accent2);
    color: #000;
    box-shadow: 0 0 20px var(--accent2-glow);
}

#paypal-button-container {
    width: 100%;
    margin-top: 1.5rem;
    min-height: 120px;
    background: #ffffff !important; /* Embracing the white for branding */
    border: none;
    border-radius: 1.25rem;
    padding: 2.5rem; /* Augmentation du padding */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#paypal-button-container * {
    background-color: transparent !important;
}

#paypal-button-container iframe {
    position: relative !important;
    background-color: transparent !important;
}

/* Responsive Overhaul */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .shop-sidebar {
        order: -1; /* Keep search on top */
    }

    .modal-content {
        height: auto;
        max-height: 98vh;
        width: 100%;
        margin-top: 0;
        border-radius: 1.5rem 1.5rem 0 0;
        position: absolute;
        bottom: 0;
    }
    
    .modal-inner-grid {
        grid-template-columns: 1fr;
        height: auto;
        min-height: unset;
        display: block; /* Force natural block flow */
    }
    
    .modal-sidebar-cart, .modal-main-form {
        padding: 2.5rem 1.5rem;
        overflow: visible; /* Elimine le double scroll */
        height: auto;
        background: #0d1117;
    }

    .modal-sidebar-cart {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

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

    .cart-item-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem;
    }

    .cart-item-controls-row {
        width: 100%;
        justify-content: space-between;
    }

    /* Product Modal Responsive */
    .product-modal-grid {
        grid-template-columns: 1fr;
    }
    .product-modal-image-col {
        height: 300px;
        padding: 2rem;
    }
    .product-modal-info-col {
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .max-width-container {
        padding: 0 1rem;
    }

    .shop-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .shop-title {
        font-size: 1.6rem;
    }

    .products-grid-modern {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar-block {
        padding: 1.5rem;
    }
    
    .cart-trigger-wrapper {
        width: 100%;
        justify-content: center;
    }
    
    .total-value-main {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .product-details {
        padding: 1.25rem;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price-modern {
        font-size: 1.3rem;
    }

    .prod-modal-title { font-size: 1.5rem; }
    .product-modal-image-col { height: 250px; }
    .product-modal-info-col { padding: 1.5rem; padding-bottom: 3rem; }
    .post-add-modal { padding: 2rem; }

    .modal-close-premium { 
        top: 1rem; right: 1rem; width: 40px; height: 40px; 
        background: rgba(0,0,0,0.8); border: 1px solid var(--accent2);
        backdrop-filter: blur(10px); z-index: 10001; opacity: 1; visibility: visible;
        display: flex; align-items: center; justify-content: center;
    }

    /* Cart Item Mobile Optimization */
    .cart-item-modern {
        flex-direction: row; flex-wrap: wrap; gap: 1rem; padding: 1rem;
    }

    .cart-item-thumb { width: 60px; height: 60px; }
    .cart-item-name { width: calc(100% - 80px); font-size: 0.95rem; }
    
    .cart-item-controls-row {
        width: 100%; display: flex; justify-content: space-between;
        align-items: center; margin-top: 0.5rem; padding-top: 0.5rem;
        border-top: 1px solid rgba(255,255,255,0.05);
    }

    .quantity-controls-modern { height: 32px; }
    .qty-btn-modern { width: 30px; height: 30px; }
}

/* Product Detail Page */
.product-detail-container { padding: 40px 20px; color: #fff; }
.product-detail-wrapper { 
    display: flex; 
    gap: 40px; 
    margin-top: 30px; 
    align-items: flex-start; /* Important pour le sticky */
}
.product-gallery { 
    flex: 1; 
    min-width: 300px; 
    background: rgba(255,255,255,0.03); 
    padding: 20px; 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.05); 
    position: sticky;
    top: 120px;
    height: auto;
    align-self: flex-start; /* Empêche le stretching qui casse le sticky */
}

/* Discount Styles */
.original-price-strike {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 1.2rem;
    margin-right: 1rem;
    opacity: 0.6;
}

.original-price-strike-small {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 0.9rem;
    margin-right: 0.5rem;
    opacity: 0.6;
}

.discounted-price-highlight {
    color: var(--accent2);
    font-weight: 950;
    font-size: 1.8rem;
    text-shadow: 0 0 10px var(--accent2-glow);
}

.product-price.discounted {
    display: flex;
    align-items: baseline;
}

.prod-modal-price-wrapper {
    margin-bottom: 0.5rem;
}

.prod-modal-price.discounted {
    color: var(--accent2);
}
.main-product-image { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: #fff; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); padding: 1rem; }
.thumb-gallery { display: flex; gap: 10px; margin-top: 15px; flex-wrap: wrap; }
.thumb-image { width: 80px; height: 80px; object-fit: contain; background: #fff; padding: 5px; border-radius: 6px; cursor: pointer; border: 2px solid rgba(255,255,255,0.1); transition: all 0.3s; }
.thumb-image:hover { border-color: #4622a5; }
.product-info { flex: 1.5; min-width: 300px; }
.product-title { font-size: 2.5rem; color: #fff; margin-bottom: 15px; font-weight: 700; line-height: 1.2; }
.product-price { font-size: 2rem; color: var(--accent2); font-weight: bold; margin-bottom: 25px; }
.product-description-short { margin-bottom: 20px; font-size: 1.15rem; color: #e0e0e0; border-left: 4px solid var(--accent); padding-left: 15px; }
.product-description-long { margin-bottom: 30px; color: #b0b0b0; line-height: 1.7; font-size: 1rem; }
.product-detail-meta { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; margin-bottom: 30px;}
.product-detail-meta p { margin-bottom: 15px; color: #ccc; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
.product-detail-meta p:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.product-detail-meta strong { color: #fff; }
.product-actions { display: flex; gap: 15px; margin-top: 30px; flex-wrap: wrap; }
.shop-container .btn { padding: 14px 28px; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 600; font-family: inherit; font-size: 1.1rem; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s ease; }
.shop-container .btn-primary { background: linear-gradient(135deg, var(--accent), #6a35ff); color: white; box-shadow: 0 4px 15px var(--accent-glow); }
.shop-container .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }
.shop-container .btn-secondary { background: #333; color: #888; cursor: not-allowed; }
.shop-container .btn-outline { border: 2px solid rgba(255,255,255,0.1); color: white; background: transparent; }
.shop-container .btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.3); }

/* Utilities */
.text-decoration-none { text-decoration: none !important; }
.text-danger { color: #ff3e3e !important; }

@media (max-width: 768px) {
    .product-detail-wrapper { flex-direction: column; }
    .product-gallery { position: static !important; width: 100%; min-width: 0; margin-bottom: 20px; }
    .product-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
}