/* =========================================================
   PRODUCTION-READY APP SKIN
   Full width, no unwanted horizontal scroll, safer layout rules
   ========================================================= */

/* ---------- Root ---------- */
:root {
    --primary: #b45309;
    --primary-dark: #92400e;
    --secondary: #f59e0b;
    --light: #fffbeb;
    --dark: #1f2937;

    --ios-blue: #007AFF;
    --ios-blue-dark: #0056CC;
    --ios-pink: #FF2D55;
    --ios-pink-dark: #D70040;
    --ios-green: #34C759;
    --ios-green-dark: #30B453;

    --card-border: #e5e5e7;
    --card-border-hover: #d1d1d6;
    --soft-bg: #f2f2f7;
    --soft-bg-2: #f5f5f7;
    --text-dark: #1d1d1f;
    --text-muted: #6b7280;

    --container-max: 1280px;
    --container-pad: 16px;
    --sidebar-width: 256px;

    --radius-sm: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 18px 45px rgba(0, 0, 0, 0.14);
}

/* ---------- Safe reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
    color: var(--dark);
}

/* ---------- App wrappers ---------- */
.app-container {
    background: linear-gradient(180deg, #f5f5f7 0%, #ffffff 100%);
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
}

.main-content-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
}

#content-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    transition: padding-left 0.3s ease;
}

@media (min-width: 1024px) {
    #content-shell {
        padding-left: var(--sidebar-width);
    }
}

@media (max-width: 1023.98px) {
    #content-shell {
        padding-left: 0 !important;
    }
}

/* ---------- Containers ---------- */
.container,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-4xl {
    width: 100%;
    max-width: min(var(--container-max), 100%);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
}

@media (max-width: 768px) {
    .container,
    .max-w-7xl,
    .max-w-6xl,
    .max-w-5xl,
    .max-w-4xl {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* ---------- Card system ---------- */
.classic-card,
.modern-card,
.review-card {
    width: 100%;
    max-width: 100%;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1), border-color 0.25s ease;
}

.classic-card:hover,
.modern-card:hover,
.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--card-border-hover);
}

.modern-card,
.review-card {
    padding: 1.5rem;
}

/* ---------- Buttons ---------- */
.classic-button,
.btn-primary {
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-blue-dark) 100%);
    color: #fff;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.30);
    transition: all 0.2s ease;
    cursor: pointer;
}

.classic-button:hover,
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.35);
}

.classic-button-secondary {
    background: var(--soft-bg);
    color: var(--text-dark);
    border: 1px solid #c7c7cc;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.classic-button-secondary:hover {
    background: #e5e5ea;
    border-color: #aeaeb2;
}

.classic-button-gift {
    background: linear-gradient(135deg, var(--ios-pink) 0%, var(--ios-pink-dark) 100%);
    color: #fff;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 45, 85, 0.30);
    transition: all 0.2s ease;
}

.classic-button-gift:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 45, 85, 0.40);
}

/* ---------- Utility UI ---------- */
.status-bar {
    height: 44px;
    width: 100%;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.price-tag {
    background: linear-gradient(135deg, var(--ios-green) 0%, var(--ios-green-dark) 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(52,199,89,.3);
}

.badge-new {
    background: linear-gradient(135deg, var(--ios-pink) 0%, var(--ios-pink-dark) 100%);
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e5e7, transparent);
    margin: 32px 0;
}

/* ---------- Product cards ---------- */
.product-card-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.product-card-padding {
    padding: 12px;
}

@media (min-width: 640px) {
    .product-card-img {
        height: 150px;
    }

    .product-card-padding {
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .product-card-img {
        height: 180px;
    }
}

/* ---------- Sidebar ---------- */
#sidebar {
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

#sidebar::-webkit-scrollbar {
    width: 8px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.08);
    border-radius: 8px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.15);
}

.sidebar-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--ios-blue) 0%, var(--ios-blue-dark) 100%);
    color: white;
}

.sidebar-link.active i {
    color: white !important;
}

/* ---------- Header ---------- */
.vintage-header {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
}

/* ---------- Hero ---------- */
.hero-gradient {
    width: 100%;
    background: linear-gradient(135deg, var(--light) 0%, #fed7aa 100%);
}

/* ---------- Layout grids ---------- */
.responsive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 1.5rem;
    width: 100%;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 1.5rem;
    width: 100%;
}

.grid > * {
    min-width: 0;
    width: 100%;
}

/* ---------- CTA ---------- */
.cta-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

/* ---------- Reviews ---------- */
.reviews-section {
    width: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    min-width: 0;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.review-stars {
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.review-stars .far {
    color: #d1d5db;
}

.review-content {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.review-text {
    color: #4b5563;
    line-height: 1.6;
    font-style: italic;
    position: relative;
    padding-left: 1rem;
}

.review-text::before {
    content: '"';
    font-size: 3rem;
    color: #fbbf24;
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    opacity: 0.2;
}

.review-footer {
    color: #6b7280;
    font-size: 0.875rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
    margin-top: auto;
}

/* ---------- Promo bars ---------- */
.promo-stack {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.promo-bar {
    width: 100%;
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: slideIn 0.5s ease-out;
}

.promo-bar.promo-blue {
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 100%);
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
}

/* ---------- Typography ---------- */
.text-balance {
    text-wrap: balance;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* ---------- Media safety ---------- */
img,
video,
iframe,
embed,
object,
svg,
canvas {
    max-width: 100%;
}

img,
video,
iframe {
    height: auto;
    display: block;
}

/* ---------- Flex safety ---------- */
.flex,
.inline-flex {
    max-width: 100%;
    min-width: 0;
}

/* Use this class when wrapping is actually desired */
.wrap-safe {
    flex-wrap: wrap;
}

/* ---------- Horizontal scrollers only where intended ---------- */
.horizontal-scroll,
.md\:hidden.flex {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* ---------- Bootstrap-like safety ---------- */
.row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.col-md-4,
.col-sm-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* ---------- Section sizing ---------- */
section,
main,
header,
footer {
    width: 100%;
    max-width: 100%;
}

/* ---------- Positioned elements ---------- */
.absolute,
.fixed {
    max-width: 100vw;
}

/* ---------- Ad container ---------- */
.ad-container {
    width: 100%;
    max-width: 728px;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin: 2rem auto;
}

/* ---------- Animations ---------- */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .responsive-grid {
        grid-template-columns: 1fr;
    }

    section,
    .py-8,
    .py-12,
    .py-16 {
        width: 100%;
        max-width: 100%;
    }
}

/* ---------- Small mobile ---------- */
@media (max-width: 640px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .cta-card {
        flex-direction: column;
        text-align: center;
    }

    .cta-card .flex-shrink-0 {
        margin-bottom: 0.75rem;
    }

    .cta-card .flex-grow {
        text-align: center;
    }

    .cta-card .flex.items-center {
        justify-content: center;
    }

    .promo-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}