/* ==========================================================================
   Apple.com Official Design System Theme
   Clean, Minimalist, Bento Grid, Frosted Glass, Dynamic Island
   ========================================================================== */

:root {
    --apple-bg: #F5F5F7;
    --apple-dark-bg: #000000;
    --apple-nav-bg: rgba(22, 22, 23, 0.82);
    --apple-card-bg: #FFFFFF;
    --apple-text: #1D1D1F;
    --apple-text-light: #F5F5F7;
    --apple-muted: #86868B;
    --apple-blue: #0071E3;
    --apple-blue-hover: #0077ED;
    --apple-blue-rgb: 0, 113, 227;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-border-light: rgba(255, 255, 255, 0.12);
    --apple-radius: 22px;
    --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Cairo", sans-serif;
}

body {
    background-color: var(--apple-bg);
    color: var(--apple-text);
    font-family: var(--apple-font);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

/* ==========================================================================
   1. Apple Global Navigation Bar (ac-globalnav)
   ========================================================================== */

.apple-globalnav {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 48px;
    background: var(--apple-nav-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--apple-border-light);
    color: #F5F5F7;
    transition: background-color 0.3s ease;
}

.apple-globalnav-inner {
    max-width: 1024px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.apple-globalnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F5F5F7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    opacity: 0.92;
    transition: opacity 0.2s;
}
.apple-globalnav-brand:hover { opacity: 1; }

.apple-brand-logo {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
}

.apple-icon {
    fill: #F5F5F7;
    flex-shrink: 0;
}

.apple-globalnav-links {
    display: none;
    gap: 28px;
}
@media (min-width: 640px) {
    .apple-globalnav-links { display: flex; align-items: center; }
}

.apple-globalnav-links a {
    color: #d1d1d6;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    transition: color 0.2s ease;
}
.apple-globalnav-links a:hover { color: #FFFFFF; }

.apple-globalnav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apple-nav-btn {
    background: transparent;
    border: 0;
    color: #F5F5F7;
    cursor: pointer;
    position: relative;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.apple-nav-btn:hover { transform: scale(1.08); }

.apple-nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--apple-blue);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    padding: 0 4px;
}

/* ==========================================================================
   2. Apple Ribbon (Announcement Bar)
   ========================================================================== */

.apple-ribbon {
    background: #1D1D1F;
    color: #F5F5F7;
    font-size: 12px;
    padding: 10px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.apple-ribbon-content {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    letter-spacing: -0.01em;
}

.apple-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.apple-status-dot.is-open {
    background: #34C759;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.6);
}
.apple-status-dot.is-closed {
    background: #FF453A;
}

.apple-ribbon-divider {
    color: var(--apple-muted);
    opacity: 0.6;
}

.apple-ribbon-link {
    color: #2997FF;
    text-decoration: none;
    font-weight: 500;
    margin-right: 4px;
    transition: text-decoration 0.2s;
}
.apple-ribbon-link:hover { text-decoration: underline; }

/* ==========================================================================
   3. Apple Cinematic Hero Section
   ========================================================================== */

.apple-hero {
    background: #000000;
    color: #F5F5F7;
    text-align: center;
    padding: 60px 20px 48px;
    position: relative;
    overflow: hidden;
}

.apple-hero::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.18) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.apple-hero-container {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.apple-hero-eyebrow {
    font-size: 15px;
    font-weight: 600;
    color: var(--apple-muted);
    letter-spacing: 0.04em;
    display: block;
    margin-bottom: 8px;
}

.apple-hero-title {
    font-size: clamp(32px, 6vw, 54px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.1;
    margin: 0 0 12px 0;
    color: #F5F5F7;
}

.apple-hero-subtitle {
    font-size: clamp(16px, 2.8vw, 22px);
    font-weight: 400;
    color: var(--apple-muted);
    line-height: 1.45;
    max-width: 580px;
    margin: 0 auto 28px;
    letter-spacing: -0.005em;
}

.apple-hero-ctas {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.apple-btn-primary {
    background-color: var(--apple-blue);
    color: #FFFFFF;
    padding: 10px 22px;
    border-radius: 980px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.apple-btn-primary:hover {
    background-color: var(--apple-blue-hover);
    transform: scale(1.02);
}

.apple-btn-link {
    background: transparent;
    border: none;
    color: #2997FF;
    font-size: 16px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: gap 0.2s ease;
    padding: 8px 12px;
}
.apple-btn-link:hover {
    text-decoration: underline;
    gap: 9px;
}

.apple-hero-showcase {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.apple-showcase-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   4. Apple Search & Subnav
   ========================================================================== */

.apple-search-wrap {
    max-width: 960px;
    margin: 24px auto 8px;
    padding: 0 16px;
}

.apple-search-box {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 980px;
    padding: 6px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-search-box:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

.apple-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 15px;
    background: transparent;
    color: var(--apple-text);
    font-family: inherit;
}
.apple-search-input::placeholder {
    color: var(--apple-muted);
}

.apple-search-clear {
    border: none;
    background: none;
    color: var(--apple-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

/* Sticky Subnav Categories (Apple Style) */
.apple-subnav {
    position: sticky;
    top: 48px;
    z-index: 990;
    background: rgba(245, 245, 247, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    padding: 12px 16px;
}

.apple-subnav-list {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.apple-subnav-list::-webkit-scrollbar { display: none; }

.apple-subnav-pill {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--apple-text);
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 7px 18px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}
.apple-subnav-pill:hover {
    background: #1D1D1F;
    color: #FFFFFF;
    border-color: #1D1D1F;
}

/* ==========================================================================
   5. Apple Bento Grid / Product Cards
   ========================================================================== */

.apple-catalog {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

.apple-category-section {
    margin-bottom: 40px;
}

.apple-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.apple-section-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--apple-text);
    margin: 0;
}

.apple-bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) {
    .apple-bento-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

.apple-card {
    background: var(--apple-card-bg);
    border-radius: var(--apple-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-card:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.apple-card-media {
    width: 100%;
    height: 165px;
    background: #FBFBFD;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) {
    .apple-card-media { height: 195px; }
}

.apple-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-card:hover .apple-card-img {
    transform: scale(1.05);
}

.apple-card-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1D1D1F 0%, #323236 100%);
    color: #FFFFFF;
    font-size: 38px;
    font-weight: 800;
}

.apple-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.apple-card-category-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--apple-muted);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.apple-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--apple-text);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}
@media (min-width: 768px) {
    .apple-card-title { font-size: 19px; }
}

.apple-card-desc {
    font-size: 13px;
    color: var(--apple-muted);
    line-height: 1.4;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.apple-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.apple-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--apple-text);
    letter-spacing: -0.01em;
}

.apple-card-add-btn {
    background: var(--apple-blue);
    color: #FFFFFF;
    border: none;
    border-radius: 980px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-card-add-btn:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.04);
}
.apple-card-add-btn:active {
    transform: scale(0.95);
}

.apple-card.is-sold {
    opacity: 0.55;
    cursor: not-allowed;
}
.apple-card.is-sold:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   6. Apple Dynamic Island Floating Cart Bar
   ========================================================================== */

.apple-dynamic-island {
    position: fixed;
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 16px;
    right: 16px;
    max-width: 460px;
    margin: 0 auto;
    z-index: 999;
}

.apple-dynamic-pill {
    width: 100%;
    background: rgba(0, 0, 0, 0.90);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    border-radius: 980px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.apple-dynamic-pill:hover {
    transform: scale(1.02);
    background: rgba(0, 0, 0, 0.95);
}
.apple-dynamic-pill:active {
    transform: scale(0.98);
}

.apple-dynamic-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apple-dynamic-badge {
    background: var(--apple-blue);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    padding: 0 6px;
}

.apple-dynamic-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.apple-dynamic-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.apple-dynamic-total {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.apple-dynamic-arrow {
    color: var(--apple-muted);
}

/* ==========================================================================
   7. Apple iOS Modal / Customization Bottom Sheet
   ========================================================================== */

.apple-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
}

.apple-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FFFFFF;
    border-radius: 28px 28px 0 0;
    padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
    max-height: 85vh;
    overflow-y: auto;
    z-index: 1001;
    max-width: 580px;
    margin: 0 auto;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}
@media (min-width: 640px) {
    .apple-sheet {
        position: fixed;
        top: 50%;
        bottom: auto;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        border-radius: 28px;
        padding: 24px 28px;
        width: 92%;
        max-width: 540px;
    }
}

.apple-sheet-handle {
    width: 38px;
    height: 5px;
    background: #D1D1D6;
    border-radius: 980px;
    margin: 0 auto 16px;
}

.apple-sheet-close {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background: #F2F2F7;
    border: none;
    color: var(--apple-text);
    font-size: 18px;
    display: grid;
    place-items: center;
    cursor: pointer;
    line-height: 1;
}

.apple-sheet-media {
    width: 100%;
    height: 180px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #FBFBFD;
}
.apple-sheet-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apple-sheet h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px 0;
    letter-spacing: -0.015em;
    color: var(--apple-text);
}

.apple-sheet-desc {
    font-size: 14px;
    color: var(--apple-muted);
    line-height: 1.45;
    margin: 0 0 20px 0;
}

/* Apple Segmented Controls (Size / Options) */
.apple-segmented-group {
    margin-bottom: 20px;
}
.apple-segmented-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.apple-segmented-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.apple-segmented-pill {
    flex: 1;
    min-width: 80px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #F5F5F7;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-text);
}
.apple-segmented-pill input { display: none; }
.apple-segmented-pill.is-selected {
    background: #1D1D1F;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.apple-segmented-pill em {
    font-style: normal;
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}

/* Addons List */
.apple-addons-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.apple-addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #F5F5F7;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.apple-addon-item input {
    width: 18px;
    height: 18px;
    accent-color: var(--apple-blue);
}

/* Stepper */
.apple-stepper {
    display: inline-flex;
    align-items: center;
    background: #F5F5F7;
    border-radius: 980px;
    padding: 4px;
    gap: 12px;
    margin: 16px 0;
}
.apple-stepper-btn {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: #FFFFFF;
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--apple-text);
    font-size: 18px;
    font-weight: 600;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.apple-stepper-val {
    font-size: 16px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.apple-btn-full {
    width: 100%;
    background: var(--apple-blue);
    color: #FFFFFF;
    border: none;
    border-radius: 980px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}
.apple-btn-full:hover {
    background: var(--apple-blue-hover);
    transform: scale(1.01);
}
.apple-btn-full:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   8. Apple Checkout Form Styling
   ========================================================================== */

.apple-form-field {
    margin-bottom: 14px;
}
.apple-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-muted);
    margin-bottom: 6px;
}
.apple-form-input, .apple-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #E5E5EA;
    background: #F5F5F7;
    font-size: 15px;
    font-family: inherit;
    color: var(--apple-text);
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.apple-form-input:focus, .apple-form-textarea:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.apple-fulfillment-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.apple-fulfillment-opt {
    background: #F5F5F7;
    border: 1px solid transparent;
    padding: 10px 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.apple-fulfillment-opt input { display: none; }
.apple-fulfillment-opt.is-active {
    background: #1D1D1F;
    color: #FFFFFF;
}

.apple-cart-line-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F2F2F7;
}

.apple-totals-card {
    background: #F5F5F7;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.apple-totals-row {
    display: flex;
    justify-content: space-between;
    color: var(--apple-muted);
}
.apple-totals-row.grand-total {
    font-size: 17px;
    font-weight: 800;
    color: var(--apple-text);
    border-top: 1px solid #E5E5EA;
    padding-top: 8px;
    margin-top: 2px;
}

/* ==========================================================================
   Activity Badges & Apple Tech Specific Enhancements
   ========================================================================== */

.biz-feature-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 10px;
}

.biz-pill {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.apple-pill {
    background: #FFFFFF;
    color: #1D1D1F;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.apple-floating-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: -0.2px;
    z-index: 2;
}

.apple-specs-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0;
    font-size: 11.5px;
    color: #86868B;
    font-weight: 500;
    flex-wrap: wrap;
}

.apple-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   Apple Order Success Confirmation Modal (Direct System Orders)
   ========================================================================== */

.apple-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: appleFadeIn 0.25s ease;
}

.apple-success-card {
    background: #FFFFFF;
    border-radius: 24px;
    max-width: 440px;
    width: 100%;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.08);
    animation: appleScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-success-icon-wrap {
    width: 68px;
    height: 68px;
    background: #DCFCE7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.apple-success-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1D1D1F;
    margin: 0 0 8px;
}

.apple-success-subtitle {
    font-size: 14px;
    color: #86868B;
    margin: 0 0 22px;
    line-height: 1.5;
}

.apple-success-summary {
    background: #F5F5F7;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.apple-success-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.apple-success-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes appleFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes appleScaleUp {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* ==========================================================================
   Mobile-First & Touchscreen Optimization (شاشات الهواتف الذكية والأجهزة المحمولة)
   ========================================================================== */

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

@media (max-width: 640px) {
    /* 1. Mobile Header & Announcement */
    .apple-globalnav-inner {
        height: 52px;
        padding: 0 16px;
    }
    .apple-brand-logo {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .apple-globalnav-brand span {
        font-size: 15px;
        font-weight: 700;
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .apple-nav-btn {
        width: 40px;
        height: 40px;
    }

    .apple-ribbon {
        font-size: 12px;
        padding: 8px 12px;
        line-height: 1.4;
    }
    .apple-ribbon-content {
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 2. Mobile Hero */
    .apple-hero {
        padding: 28px 16px 20px;
    }
    .apple-hero-eyebrow {
        font-size: 12px;
        margin-bottom: 8px;
    }
    .apple-hero-title {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 10px;
    }
    .apple-hero-subtitle {
        font-size: 13.5px;
        margin-bottom: 18px;
        line-height: 1.5;
    }
    .apple-hero-ctas {
        gap: 10px;
        margin-bottom: 18px;
    }
    .apple-btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
    .apple-btn-link {
        font-size: 14px;
    }
    .biz-feature-badges {
        gap: 6px;
        margin: 14px 0 6px;
    }
    .biz-pill {
        font-size: 11.5px;
        padding: 5px 10px;
    }

    /* 3. Mobile Search & Categories Subnav */
    .apple-search-wrap {
        padding: 10px 14px 4px;
    }
    .apple-search-box {
        height: 42px;
    }
    .apple-search-input {
        font-size: 14px;
    }
    .apple-subnav {
        top: 52px;
        padding: 8px 0;
    }
    .apple-subnav-list {
        padding: 0 14px;
        gap: 6px;
    }
    .apple-subnav-pill {
        font-size: 13px;
        padding: 6px 14px;
        min-height: 36px;
        white-space: nowrap;
    }

    /* 4. Mobile Product Cards Grid */
    .apple-catalog {
        padding: 12px 14px 30px;
    }
    .apple-section-title {
        font-size: 19px;
        margin: 20px 0 12px;
    }
    .apple-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .apple-card {
        border-radius: 16px;
    }
    .apple-card-media {
        height: 125px;
    }
    .apple-card-body {
        padding: 10px 10px 12px;
    }
    .apple-card-category-tag {
        font-size: 10px;
        margin-bottom: 2px;
    }
    .apple-card-title {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 36px;
    }
    .apple-card-desc {
        display: none; /* Hide lengthy text on small 2-column mobile cards to maintain clean uniform height */
    }
    .apple-card-footer {
        padding-top: 8px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .apple-card-price {
        font-size: 13px;
        font-weight: 700;
        text-align: center;
    }
    .apple-card-add-btn {
        width: 100%;
        padding: 7px 8px;
        font-size: 12px;
        border-radius: 999px;
        justify-content: center;
        background: var(--apple-blue);
        color: #FFFFFF;
    }

    /* 5. Mobile Dynamic Island & Bottom Sheets */
    .apple-dynamic-island {
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: calc(100% - 24px);
    }
    .apple-dynamic-pill {
        padding: 10px 18px;
        height: 52px;
    }
    .apple-sheet {
        padding: 18px 18px calc(24px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        max-height: 88vh;
    }
    .apple-btn-full {
        height: 50px;
        font-size: 15px;
        border-radius: 14px;
    }
}

/* Extra small devices (< 360px) */
@media (max-width: 360px) {
    .apple-bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .apple-card-desc {
        display: -webkit-box;
    }
    .apple-card-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .apple-card-add-btn {
        width: auto;
        padding: 8px 16px;
    }
}
