
/*
Theme Name: SM Handmade Studio
Theme URI: https://smhandmadestudio.com
Author: SM Handmade Studio
Author URI: https://smhandmadestudio.com
Description: A light and family-friendly WordPress theme for an online catalog of handmade products for children, babies, and gift items. Features custom product catalog with cart functionality and order management.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sm-handmade-studio
Tags: e-commerce, catalog, handmade, family-friendly, light, custom-post-type
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --baby-pink: #FFB6D9; /* Baby Pink */
    --baby-blue: #B8E0FF; /* Baby Blue */
    --pink-light: #FFE5F0;
    --blue-light: #E0F2FF;
    --text-color: #000000; /* Black for all text */
    --text-light: #333333;
    --border-color: #D0D0D0;
    --white: #FFFFFF;
    --header-gradient: linear-gradient(135deg, #B8E0FF 0%, #FFB6D9 100%);
    --footer-gradient: linear-gradient(135deg, #FFB6D9 0%, #B8E0FF 100%);
    --site-gradient: linear-gradient(180deg, #FFE5F0 0%, #FFFFFF 30%, #FFFFFF 70%, #E0F2FF 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Kalam', 'Caveat', cursive;
    color: var(--text-color);
    background: var(--site-gradient);
    background-attachment: fixed;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Disable callout on iOS */
    touch-action: manipulation; /* Improve touch responsiveness */
    min-height: 100vh;
    font-size: 1.1rem;
}

/* Typography - All text in handwritten font and black */
h1, h2, h3, h4, h5, h6, p, a, span, div, button, input, textarea, label {
    font-family: 'Kalam', 'Caveat', cursive;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-color);
}

h1 {
    font-size: 3.2rem;
    font-weight: 700;
}

h2 {
    font-size: 2.8rem;
    font-weight: 700;
}

h3 {
    font-size: 2rem;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--text-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--text-color);
    opacity: 0.7;
}

a::after {
    display: none;
}

/* Header Styles - Baby Pink/Blue Gradient */
.site-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header {
    background: var(--header-gradient);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.site-header:hover {
    box-shadow: var(--shadow-md);
}

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

.site-title {
    font-size: 2.6rem;
    font-family: 'Kalam', 'Caveat', cursive;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    padding: 0.5rem 1rem;
}

.site-title a {
    color: var(--text-color);
    position: relative;
    z-index: 2;
}

.site-title-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Site Logo Styles */
.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 70px; /* Fixed container height */
}

.site-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    height: 100%;
}

.site-logo img {
    height: 70px; /* Fixed height - will scale proportionally */
    width: auto;
    max-width: 120px; /* Maximum width constraint */
    object-fit: contain; /* Preserves aspect ratio */
    object-position: center;
    display: block;
}

.site-title a::after {
    display: none;
}

/* Mobile Menu Toggle Button (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    gap: 6px;
}

.mobile-menu-toggle:focus {
    outline: 2px solid var(--text-color);
    outline-offset: 2px;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Desktop Navigation - ensure it's visible */
@media (min-width: 769px) {
    .main-navigation {
        display: block !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .mobile-menu-toggle {
        display: none !important;
    }
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.6rem;
    display: block;
}

.main-navigation > ul > li > a:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.main-navigation a::after {
    display: none;
}

/* Submenu Styles - Desktop version */
.main-navigation .menu-item-has-children {
    position: relative;
}

.main-navigation .menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 0.8rem;
}

/* Desktop submenu styles - applied only on desktop */
@media (min-width: 769px) {
    .main-navigation .menu-item-has-children {
        position: relative !important;
    }
    
    .main-navigation .sub-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: auto !important;
        min-width: 250px !important;
        max-width: 350px !important;
        background: var(--header-gradient) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
        border: none !important;
        border-radius: 10px !important;
        padding: 1rem 0 !important;
        margin-top: 0.5rem !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(-10px) !important;
        transition: all 0.3s ease !important;
        z-index: 999 !important;
        list-style: none !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        pointer-events: none !important;
    }

    /* Show submenu on hover - Desktop */
    .main-navigation .menu-item-has-children:hover .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }
    
    /* Keep submenu visible when hovering over it */
    .main-navigation .sub-menu:hover {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    .main-navigation .sub-menu::before {
        display: none !important;
    }

    .main-navigation .sub-menu li {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        flex: 0 0 auto !important;
        display: block !important;
        min-height: 45px !important;
        height: 45px !important;
        width: 100% !important;
    }

    .main-navigation .sub-menu a {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 1.5rem !important;
        color: var(--text-color) !important;
        font-weight: 400 !important;
        font-size: 1.4rem !important;
        transition: all 0.2s ease !important;
        border-radius: 0 !important;
        background: transparent !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 45px !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    .main-navigation .sub-menu a:hover {
        background: rgba(255, 255, 255, 0.5) !important;
        color: var(--text-color) !important;
        transform: none !important;
        padding-left: 1.8rem !important;
    }
}

.cart-icon {
    position: relative;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
}

.cart-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1) rotate(-5deg);
}

.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--baby-pink);
    color: var(--text-color);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
    padding: 5rem 2rem;
    border-radius: 20px;
    margin: 3rem auto;
    max-width: 1200px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    opacity: 0.5;
    border-radius: 50%;
}

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

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    background: none;
    -webkit-text-fill-color: var(--text-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.site-main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 30px;
    min-height: 60vh;
}

.home .site-main {
    max-width: 100%;
    margin: 3rem auto;
    padding: 0 20px;
}

.site-main.single-product-main {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-header {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 3rem 0;
    max-width: 100%;
}

/* Archive/Products page - smaller cards */
.post-type-archive-product .products-grid,
.archive .products-grid,
.products-section .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.2rem;
    justify-items: stretch;
    justify-content: flex-start;
}

.post-type-archive-product .product-card,
.archive .product-card,
.products-section .product-card {
    max-width: 340px;
    width: 100%;
}

.post-type-archive-product .product-image-wrapper,
.archive .product-image-wrapper,
.products-section .product-image-wrapper {
    height: 240px;
}

.post-type-archive-product .product-info,
.archive .product-info,
.products-section .product-info {
    padding: 0.85rem;
    min-height: 170px;
}

.post-type-archive-product .product-title,
.archive .product-title,
.products-section .product-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.post-type-archive-product .product-price,
.archive .product-price,
.products-section .product-price {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.post-type-archive-product .add-to-cart-btn,
.archive .add-to-cart-btn,
.products-section .add-to-cart-btn {
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 20px;
}

/* Pagination */
.navigation.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin: 2rem 0 4rem;
    font-size: 1.1rem;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.navigation.pagination ul.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation.pagination ul.page-numbers li {
    margin: 0;
}

.navigation.pagination ul.page-numbers a,
.navigation.pagination ul.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.navigation.pagination ul.page-numbers .current {
    background: linear-gradient(135deg, #B8E0FF 0%, #FFB6D9 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.navigation.pagination ul.page-numbers a:hover {
    opacity: 0.85;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(255, 182, 193, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home .products-grid,
.home .home-new-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
    width: 100%;
    justify-items: center;
}

.home .product-card {
    max-width: 360px;
    width: 100%;
    margin: 0;
}

@media (max-width: 1400px) {
    .home .products-grid,
    .home .home-new-products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.8rem;
    }
    
    .post-type-archive-product .products-grid,
    .archive .products-grid,
    .products-section .products-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 1200px) {
    .home .products-grid,
    .home .home-new-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .home .product-card {
        max-width: none;
    }
    
    .post-type-archive-product .products-grid,
    .archive .products-grid,
    .products-section .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .home .products-grid,
    .home .home-new-products-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--baby-pink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--baby-pink);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 100px;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
}

.home .product-image-wrapper {
    height: 350px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--baby-pink);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.product-info {
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

.home .product-info {
    padding: 0.9rem;
    min-height: 180px;
}

.product-title {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-color);
    font-family: 'Kalam', 'Caveat', cursive;
    font-weight: 600;
    line-height: 1.2;
    flex-grow: 0;
}

.home .product-title {
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
}

.product-title a {
    color: var(--text-color);
}

.product-title a:hover {
    color: var(--text-color);
}

.product-price {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    margin-top: auto;
    flex-grow: 0;
}

.home .product-price {
    font-size: 1.05rem;
    margin-bottom: 0.55rem;
}

.home .product-excerpt {
    font-size: 0.95rem;
}

.product-excerpt {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    line-height: 1.3;
    opacity: 0.85;
    flex-grow: 0;
}

/* Enhanced button styles for better mobile compatibility */
.add-to-cart-btn,
.remove-item,
.mobile-menu-toggle,
button,
.submit-order-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation; /* Improves touch responsiveness */
    user-select: none; /* Prevent text selection on tap */
    cursor: pointer;
}

.add-to-cart-btn {
    background: var(--baby-pink);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-top: auto;
    flex-grow: 0;
    min-height: 44px; /* iOS recommended minimum touch target */
    user-select: none; /* Prevent text selection on mobile */
    -webkit-user-select: none;
}

.home .add-to-cart-btn {
    padding: 0.75rem 1.1rem;
    font-size: 1rem;
    border-radius: 28px;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart-btn:active,
.add-to-cart-btn.touch-active {
    transform: translateY(0);
    opacity: 0.8;
}

.remove-item:active,
.remove-item.touch-active {
    opacity: 0.7;
    transform: scale(0.98);
}

/* New Products Section */
.new-products-section {
    margin: 2rem 0 3rem 0;
}

.new-products-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-family: 'Kalam', 'Caveat', cursive;
}

/* Product Categories Section */
.product-categories-section {
    margin: 3rem 0;
    padding: 2rem 0;
}

.categories-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-family: 'Kalam', 'Caveat', cursive;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.category-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 180px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--baby-pink);
}

.category-link {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 1rem;
}

.category-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.category-image-placeholder {
    display: none;
}


.category-name {
    padding: 0.5rem 0;
    text-align: center;
    font-size: 1.15rem;
    margin: 0;
    font-family: 'Kalam', 'Caveat', cursive;
    font-weight: 600;
    line-height: 1.3;
}

.category-count {
    padding: 0.25rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    font-family: 'Kalam', 'Caveat', cursive;
}

.products-section {
    margin-top: 3rem;
}

.products-section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

/* Category Pages */
.category-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
    border-radius: 25px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0.6;
    border-radius: 50%;
}

.category-header::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    opacity: 0.6;
    border-radius: 50%;
}

.category-title {
    color: var(--text-color);
    margin-bottom: 0.8rem;
    font-size: 3rem;
    position: relative;
    z-index: 1;
    background: none;
    -webkit-text-fill-color: var(--text-color);
}

.category-description {
    color: var(--text-light);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* Single Product Page - Full Screen Layout */
.single-product {
    max-width: 100%;
    margin: 0;
    padding: 2rem 0;
}

.product-gallery {
    width: 100%;
    max-width: 100%;
    background: var(--white);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: relative;
    margin-bottom: 2rem;
}

.product-gallery img,
.product-gallery .product-main-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.product-gallery:hover img {
    transform: scale(1.02);
}

.product-details {
    background: var(--white);
    padding: 3rem;
    border-radius: 0;
    box-shadow: none;
    border: none;
    max-width: 900px;
    margin: 0 auto;
}

.product-details h1.product-title {
    font-family: 'Kalam', 'Caveat', cursive;
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.product-price-large {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    margin: 1.5rem 0;
    display: inline-block;
}

.product-description {
    margin: 2rem 0;
    line-height: 1.9;
    font-size: 1.4rem;
    color: var(--text-color);
    font-family: 'Kalam', 'Caveat', cursive;
}

.product-description p {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.personalization-section {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
    border-radius: 15px;
    border: 2px solid var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.personalization-section label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.personalization-section textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Kalam', 'Caveat', cursive;
    font-size: 1.2rem;
    resize: vertical;
    min-height: 120px;
    color: var(--text-color);
}

/* Cart Page */
.cart-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
    /* CRITICAL: Ensure font inheritance for mobile */
    font-family: 'Kalam', 'Caveat', cursive;
    font-size: inherit;
    line-height: inherit;
}


.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: var(--primary-light);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 15px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
    /* CRITICAL: Ensure font inheritance */
    font-family: inherit;
}

.cart-item-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-family: inherit;
}

.cart-item-title a {
    font-family: inherit;
    color: inherit;
    text-decoration: none;
}

.cart-item-title a:hover {
    text-decoration: underline;
}

.cart-item-price {
    color: var(--text-color);
    font-weight: bold;
    font-size: 1rem;
    font-family: inherit;
}

.cart-item-personalization {
    font-size: 1rem;
    color: var(--text-color);
    margin-top: 0.5rem;
    font-style: italic;
    opacity: 0.8;
    font-family: inherit;
}

.remove-item {
    background: linear-gradient(135deg, #ff6b6b, #ff8787);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap highlight */
    touch-action: manipulation; /* Optimize touch response */
    min-width: 80px; /* Prevent layout shift on mobile */
    min-height: 44px; /* iOS recommended minimum touch target */
    user-select: none; /* Prevent text selection on mobile */
    -webkit-user-select: none;
}

.remove-item:disabled,
.remove-item.removing {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.remove-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cart-total {
    text-align: right;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 3px solid var(--border-color);
    /* CRITICAL: Ensure font inheritance */
    font-family: inherit;
}

.cart-total-price {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: inherit;
}

.cart-total-breakdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.breakdown-item {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0.5rem 0;
    text-align: right;
    opacity: 0.85;
}

.total-amount {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 700;
    font-family: inherit;
}

/* CRITICAL: Ensure all cart page elements inherit fonts */
.site-main .cart-container,
.site-main .cart-container * {
    font-family: inherit;
}

.site-main .cart-container p,
.site-main .cart-container a {
    font-family: inherit;
}

.checkout-btn {
    background: var(--baby-pink);
    color: var(--text-color);
    border: none;
    padding: 0.85rem 1.8rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkout-btn:hover::before {
    width: 300px;
    height: 300px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Checkout Form */
.checkout-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 25px;
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
}

.checkout-form h2 {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-light);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem !important;
    font-family: 'Kalam', 'Caveat', cursive;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Kalam', 'Caveat', cursive;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--baby-pink);
    box-shadow: 0 0 0 3px var(--pink-light);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-order-btn {
    background: var(--baby-pink);
    color: var(--text-color);
    border: none;
    padding: 1.3rem 2.5rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.submit-order-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-order-btn:hover::before {
    width: 500px;
    height: 500px;
}

.submit-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Success Message */
.order-success {
    background: var(--pink-light);
    padding: 4rem 2rem;
    border-radius: 25px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.order-success::before {
    content: '✓';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-color);
    opacity: 0.3;
}

.order-success h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    z-index: 1;
    background: none;
    -webkit-text-fill-color: var(--primary-color);
}

.order-success p {
    font-size: 1.2rem;
    color: var(--text-color);
    position: relative;
    z-index: 1;
}

/* Footer - Baby Pink/Blue Gradient */
.site-footer {
    background: var(--footer-gradient);
    border-top: none;
    padding: 3rem 0;
    margin-top: 6rem;
    position: relative;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-contact {
    color: var(--text-color);
}

.footer-contact-inner {
    text-align: center;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE5F0 0%, #B8E0FF 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

.social-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.contact-social {
    text-align: center;
    margin-top: 2rem;
}

.contact-social h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.footer-contact div {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.footer-contact a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-contact a:hover {
    opacity: 0.7;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.footer-copyright {
    text-align: left;
    color: var(--text-color);
    font-size: 0.9rem;
}

.footer-privacy-link {
    text-align: left;
}

.footer-privacy-link a {
    color: var(--text-color);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.footer-privacy-link a:hover {
    opacity: 0.7;
}

.footer-credits {
    text-align: right;
    color: var(--text-color);
    font-size: 0.9rem;
}

.footer-credits a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-credits a:hover {
    opacity: 0.7;
}

.footer-credits strong {
    font-weight: 700;
}

/* Contacts Page */
.contacts-page {
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--pink-light) 100%);
    padding: 3rem;
    border-radius: 25px;
    margin: 3rem 0;
    box-shadow: var(--shadow-md);
}

.contact-info {
    margin: 2rem 0;
}

.contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    line-height: 1.8;
}

.contact-info strong {
    font-size: 1.3rem;
    color: var(--text-color);
    display: block;
    margin-bottom: 1rem;
}

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

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .site-logo {
        height: 60px; /* Slightly smaller on tablets */
    }

    .site-logo img {
        height: 60px;
        max-width: 100px;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 2.5rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        gap: 1rem;
        padding: 0 20px;
    }

    .site-title-wrapper {
        gap: 0.8rem;
    }

    .site-logo {
        height: 50px; /* Smaller logo on mobile */
    }

    .site-logo img {
        height: 50px;
        max-width: 80px;
    }

    .site-title {
        font-size: 1.6rem;
    }

    /* Show hamburger menu button on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide main navigation by default on mobile */
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-gradient);
        box-shadow: var(--shadow-lg);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    /* Show menu when mobile menu is open */
    .main-navigation.mobile-menu-open {
        max-height: 600px;
        opacity: 1;
        visibility: visible;
        padding: 1rem 0;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .main-navigation ul li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .main-navigation ul li:last-child {
        border-bottom: none;
    }

    .main-navigation a {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: left;
        font-size: 1.4rem;
    }

    /* Disable hover on mobile - only click works */
    /* Note: Desktop hover is handled in @media (min-width: 769px) above */

    /* Mobile submenu styles */
    .main-navigation .menu-item-has-children > a::after {
        content: ' ▶';
        float: right;
    }

    .main-navigation .sub-menu {
        position: static;
        display: none;
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.3);
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-navigation .menu-item-has-children.active > .sub-menu {
        display: block;
        max-height: 500px;
    }

    .main-navigation .sub-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .main-navigation .sub-menu a {
        padding-left: 2.5rem;
        font-size: 1.2rem;
    }

    .cart-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .hero-section {
        padding: 3rem 1.5rem;
        margin: 2rem auto;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .single-product-main {
        padding: 0;
    }
    
    .single-product {
        padding: 1rem 0;
    }
    
    .product-gallery img,
    .product-gallery .product-main-image {
        max-height: 60vh;
    }
    
    .product-details {
        padding: 2rem 1rem;
    }

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

    .site-main {
        padding: 0 20px;
        margin: 2rem auto;
    }

            .footer-container {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                text-align: center;
            }
            
            .footer-left {
                text-align: center;
            }
            
            .footer-copyright {
                text-align: center;
            }
            
            .footer-privacy-link {
                text-align: center;
            }
            
            .footer-contact {
                text-align: center;
            }
            
            .footer-credits {
                text-align: center;
            }

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

            .category-header {
                padding: 3rem 1.5rem;
            }

            .category-title {
                font-size: 2rem;
            }

            .categories-grid {
                justify-content: flex-start;
                gap: 0.8rem;
            }
            
            .category-card {
                min-width: 120px;
                max-width: 150px;
            }
            
            .category-name {
                font-size: 0.85rem;
            }
            
            .category-icon {
                font-size: 1.5rem;
            }
            
            .main-navigation .sub-menu {
                flex-direction: column;
                max-width: 100%;
            }
            
            .main-navigation .sub-menu li {
                border-right: none;
                border-bottom: 1px solid #f0f0f0;
                width: 100%;
            }
            
            .main-navigation .sub-menu li:last-child {
                border-bottom: none;
            }

            .categories-title,
            .products-section-title {
                font-size: 1.5rem;
            }

    .product-details {
        padding: 2rem;
    }

    .checkout-form {
        padding: 2rem;
    }

    .cart-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .site-logo {
        height: 45px; /* Even smaller on very small screens */
    }

    .site-logo img {
        height: 45px;
        max-width: 70px;
    }

    .site-title-wrapper {
        gap: 0.6rem;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* Cart Success Message */
.cart-success-message {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--baby-pink);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.cart-success-message.show {
    opacity: 1;
    transform: translateX(0);
}

/* Admin Styles */
.wp-block {
    max-width: 1200px;
}

