/* Modern Crochet/Handmade Store CSS Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    --primary: #c87a53;      /* Dusty Terracotta */
    --primary-hover: #b36742;
    --secondary: #8a9a86;    /* Sage Green */
    --secondary-hover: #758572;
    --bg-light: #faf7f2;     /* Cream/Off-white */
    --card-bg: #ffffff;
    --text-dark: #2d2421;    /* Warm Charcoal */
    --text-muted: #7d726d;
    --accent: #e5b982;       /* Warm Sandy Gold */
    --success: #52796f;
    --danger: #b23a3a;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(45, 36, 33, 0.06);
    --shadow-hover: 0 15px 35px rgba(45, 36, 33, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    text-align: start;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid rgba(200, 122, 83, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-item {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    right: 0;
    background-color: var(--primary);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item:hover::after {
    width: 100%;
}

.admin-link {
    background-color: var(--secondary);
    color: white !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
}

.admin-link:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(138, 154, 134, 0.3);
}

/* Hero Section */
.hero {
    padding: 80px 20px;
    text-align: center;
    background: radial-gradient(circle at 10% 20%, rgba(240, 222, 210, 0.6) 0%, rgba(250, 247, 242, 1) 90%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '🧶';
    position: absolute;
    font-size: 80px;
    left: 5%;
    top: 10%;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.hero::after {
    content: '✂️';
    position: absolute;
    font-size: 80px;
    right: 5%;
    bottom: 10%;
    opacity: 0.1;
    transform: rotate(20deg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(229, 185, 130, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '🌸';
    display: block;
    font-size: 20px;
    text-align: center;
    margin-top: 5px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(200, 122, 83, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(200, 122, 83, 0.15);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 85%; /* Aspect ratio */
    overflow: hidden;
    background-color: #f5f0eb;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(200, 122, 83, 0.15);
    padding-top: 20px;
    margin-top: auto;
}

.product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.product-price span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 3px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(200, 122, 83, 0.25);
}

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

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(138, 154, 134, 0.25);
}

/* Product Detail Page Layout */
.product-detail-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.product-gallery {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.03);
    background-color: #fcfbfa;
}

.product-gallery img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

.product-content-details {
    display: flex;
    flex-direction: column;
}

.back-to-shop {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 14px;
    gap: 5px;
}

.back-to-shop:hover {
    color: var(--primary);
}

.detail-category {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.detail-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 25px;
}

.detail-price span {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 600;
}

.detail-desc-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.detail-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 35px;
}

/* Order Form Container */
.order-box {
    background-color: #faf7f2;
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid rgba(200, 122, 83, 0.15);
}

.order-box-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-dark);
}

.form-group label span {
    color: var(--danger);
    margin-right: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(125, 114, 109, 0.2);
    background-color: white;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 122, 83, 0.1);
}

.phone-input-wrapper {
    position: relative;
}

.phone-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
}

.qty-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(125, 114, 109, 0.2);
    background-color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(125, 114, 109, 0.2);
    font-size: 16px;
    font-weight: 700;
}

.order-summary {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed rgba(200, 122, 83, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.order-summary-title {
    font-weight: 700;
    font-size: 16px;
}

.order-total-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
}

.w-100 {
    width: 100%;
}

/* Alert Notification styles */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Footer styling */
footer {
    background-color: #2d2421;
    color: #fcfbfa;
    padding: 60px 20px 20px;
    margin-top: 80px;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-about h3 {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-about p {
    color: #dcd6d2;
    font-size: 14px;
    line-height: 1.8;
}

.footer-links h4, .footer-contact h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.footer-links ul li a {
    color: #dcd6d2;
    font-size: 14px;
}

.footer-links ul li a:hover {
    color: var(--accent);
    padding-right: 5px;
}

.footer-contact p {
    color: #dcd6d2;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #bcaaa4;
}

/* Premium UI Elements */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 2px solid var(--bg-light);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* Glassmorphism Header update */
header {
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Animations & Keyframes */
@keyframes spin-yarn {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes wiggle-yarn {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-12deg) scale(1.15); }
    75% { transform: rotate(12deg) scale(1.15); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-btn {
    0% {
        box-shadow: 0 0 0 0 rgba(200, 122, 83, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(200, 122, 83, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(200, 122, 83, 0);
    }
}

/* Apply animations to logo emoji */
.logo a span {
    display: inline-block;
    transition: var(--transition);
}
.logo a:hover span {
    animation: wiggle-yarn 0.5s ease-in-out infinite alternate;
}

/* Product Card & Page animations */
.product-card {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.product-detail-container {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Staggered card animation delay */
.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

/* Micro-interaction for buttons */
.btn {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:active {
    transform: scale(0.95);
}
.order-box button[type="submit"] {
    animation: pulse-btn 2.2s infinite;
}

/* Smooth input focus */
.form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.form-control:focus {
    transform: translateY(-1px);
}

/* Hamburger Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: center;
}
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background-color: var(--primary-hover);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background-color: var(--primary-hover);
}

/* Responsive design */
@media (max-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }
    
    .menu-toggle {
        display: flex; /* Show hamburger toggle */
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 15px 35px rgba(45, 36, 33, 0.08);
        border-bottom: 2px solid rgba(200, 122, 83, 0.1);
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), padding 0.3s ease;
        padding: 0;
        z-index: 999;
        text-align: center;
    }
    
    .nav-menu.active {
        max-height: 250px;
        padding: 15px 0;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        display: block;
        padding: 15px 0;
        font-size: 17px;
        font-weight: 700;
        border-bottom: 1px solid rgba(200, 122, 83, 0.05);
    }
    
    .nav-menu li:last-child a {
        border-bottom: none;
    }
    
    .hero {
        padding: 50px 20px;
    }
    
    .hero h1 {
        font-size: 26px;
        line-height: 1.4;
    }
    
    .hero p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .section-title {
        margin-bottom: 25px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .order-box {
        padding: 20px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}
