/* ============================================
   The Crafty Hand — Custom Styles
   ============================================ */

:root {
    --pink: #e75480;
    --pink-dark: #c93b68;
    --cream: #fff7f0;
    --brown: #5b3a29;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--cream);
    color: #3d2c23;
}

.font-script {
    font-family: 'Pacifico', cursive;
}

/* ---------- Hero Carousel ---------- */
#hero-carousel {
    position: relative;
    height: 480px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(45, 20, 30, .72) 0%, rgba(45, 20, 30, .35) 55%, rgba(45, 20, 30, .15) 100%);
}

.hero-slide .hero-content {
    position: relative;
    z-index: 2;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    transition: all .3s;
    cursor: pointer;
}

.carousel-dot.active {
    width: 28px;
    background: #fff;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    color: var(--brown);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
    border: none;
}

.carousel-arrow:hover { background: #fff; }

/* ---------- Product Cards ---------- */
.product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(91, 58, 41, .08);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(91, 58, 41, .16);
}

.product-card .img-wrap {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f7ede4;
    cursor: pointer;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.product-card:hover .img-wrap img { transform: scale(1.07); }

.badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--pink);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    z-index: 2;
}

.badge-bestseller {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f5b301;
    color: #5b3a29;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    z-index: 2;
}

/* Category chips */
.cat-chip {
    padding: 8px 20px;
    border-radius: 999px;
    border: 1.5px solid #e9d5c5;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.cat-chip:hover { border-color: var(--pink); color: var(--pink); }

.cat-chip.active {
    background: var(--pink);
    border-color: var(--pink);
    color: #fff;
}

/* ---------- Cart Drawer ---------- */
#cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 92vw;
    height: 100vh;
    background: #fff;
    z-index: 60;
    transition: right .35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 30px rgba(0, 0, 0, .15);
}

#cart-drawer.open { right: 0; }

/* ---------- Modals ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(35, 20, 15, .55);
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--pink);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 10px 26px;
    transition: background .2s, transform .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-primary:hover { background: var(--pink-dark); transform: translateY(-1px); }

.btn-outline {
    border: 1.5px solid var(--pink);
    color: var(--pink);
    font-weight: 600;
    border-radius: 999px;
    padding: 9px 24px;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

.btn-outline:hover { background: var(--pink); color: #fff; }

/* Toast */
#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #2f2019;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 14px;
    z-index: 90;
    opacity: 0;
    transition: all .35s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Form inputs */
.input-field {
    width: 100%;
    border: 1.5px solid #e9d5c5;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    transition: border .2s;
    background: #fff;
}

.input-field:focus { border-color: var(--pink); }

/* ---------- Admin ---------- */
.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    color: #d9c3b5;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font-size: 15px;
}

.admin-nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.admin-nav-item.active { background: var(--pink); color: #fff; }

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(91, 58, 41, .07);
}

.admin-table th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9c7b64;
    padding: 10px 12px;
    border-bottom: 2px solid #f1e2d4;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #f5ebe1;
    font-size: 14px;
    vertical-align: middle;
}

.admin-table tr:hover td { background: #fdf6ef; }

.status-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 999px;
    display: inline-block;
}

.st-Pending { background: #fef3c7; color: #92400e; }
.st-Confirmed { background: #dbeafe; color: #1e40af; }
.st-Shipped { background: #ede9fe; color: #5b21b6; }
.st-Delivered { background: #d1fae5; color: #065f46; }
.st-Cancelled { background: #fee2e2; color: #991b1b; }

/* Toggle switch */
.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ddd;
    border-radius: 999px;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
    border: none;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 999px;
    transition: left .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.toggle.on { background: #22c55e; }
.toggle.on::after { left: 20px; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dcc3ae; border-radius: 999px; }

@media (max-width: 640px) {
    #hero-carousel { height: 400px; }
}
