/*
Theme Name: Gift
Theme URI: https://www.xxsx.top/
Author: 百家
Author URI: https://www.xxsx.top/
Description: 一个现代化的WordPress主题，具有优雅的设计和流畅的用户体验
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: gift
Tags: responsive, modern, clean
*/

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #2b2725;
    background-color: #fff5e8;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background-color: #ffc7c7;
    box-shadow: none;
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
    --logo-width: 150px;
}

.site-logo a {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2b2725;
    outline: none;
}

.site-logo a:focus,
.site-logo a:active {
    outline: none !important;
    box-shadow: none !important;
}

.site-logo img {
    width: auto;
    max-width: var(--logo-width);
    height: auto;
    max-height: 50px;
}

/* Navigation */
.main-navigation {
    flex-grow: 1;
    margin: 0 40px;
}

.menu-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.menu-primary > li {
    position: relative;
}

.menu-primary > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 0;
    color: rgb(43, 39, 37);
    font-size: 24px;
    font-weight: 400;
    font-family: 'Amatic SC', cursive;
    text-transform: uppercase;
    position: relative;
}
.main-navigation .menu-primary > li > a:focus,
.main-navigation .menu-primary > li > a:active,
.main-navigation .menu-primary > li > a:focus-visible {
    outline: none !important;
    box-shadow: none;
}
.menu-primary > li > a:focus,
.menu-primary > li > a:active {
    outline: none;
}

.menu-primary > li > a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2b2725;
    transition: width 0.3s ease;
}

.menu-primary > li > a:hover {
    color: #4a423e;
}

.menu-primary > li > a:hover::after {
    width: 100%;
}

.menu-primary > li > a .iconfont {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-primary > li:hover > a .iconfont {
    transform: rotate(180deg);
}

/* Sub Menu */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 10px 0;
    border-radius: 4px;
}

.menu-primary > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
}

.sub-menu li a:hover {
    background-color: #fceacc;
    color: #2b2725;
}

/* Header Icons */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    font-size: 26px;
    color: #2b2725;
    cursor: pointer;
    transition: color 0.3s ease;
    outline: none;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}
.header-icon .iconfont {
    font-size: inherit !important;
    line-height: 1;
}

.header-icon:focus {
    outline: none;
}

.header-icon:hover {
    color: #2b2725;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 26px;
    color: #2b2725;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    outline: none;
}

.mobile-menu-toggle:focus {
    outline: none;
}

.mobile-menu-toggle:hover {
    color: #2b2725;
}

/* Ensure iconfont in header icons and mobile toggle uses 26px */
.header-icon .iconfont,
.mobile-menu-toggle .iconfont {
    font-size: inherit !important;
    line-height: 1;
}

/* Search Box */
.search-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff5e8;
     
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.search-box.active {
    max-height: 200px;
    padding: 30px 0;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-form button {
    padding: 15px 30px;
    background: #ff9191;
    color: #fff7f1;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s ease;
    outline: none;
    white-space: nowrap;
}

.search-form button:focus {
    outline: none;
}

.search-form button:hover {
    background: #ff7c7c;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #fff5e8;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ffc7c7;
    flex-shrink: 0;
    background: #fff5e8;
}

.mobile-sidebar-close {
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    outline: none;
    color: rgb(43, 39, 37);
}

.mobile-sidebar-close:focus {
    outline: none;
}

.mobile-sidebar-close:hover {
    color: #4a423e;
}

.mobile-navigation {
    flex: 1;
    overflow-y: auto;
}

.mobile-menu {
    padding: 20px;
}

.mobile-menu li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu li a {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: rgb(43, 39, 37);
    background: none;
    font-family: 'Amatic SC', cursive;
    font-size: 20px;
}

.mobile-menu .menu-item-has-children > a {
    justify-content: space-between;
}

.mobile-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid #2b2725;
    border-bottom: 2px solid #2b2725;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-left: 10px;
    margin-top: -4px;
}

.mobile-menu .menu-item-has-children.active > a::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.mobile-menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: none;
    padding-left: 20px;
    display: none;
}

.mobile-menu .sub-menu.active {
    display: block;
}

.mobile-menu .sub-menu li a {
    font-size: 16px;
    padding: 6px 0;
    color: #555;
    background: none;
}

/* Mobile auth footer - fixed to sidebar bottom */
.mobile-auth {
    padding: 16px 20px;
    border-top: 1px solid #ffc7c7;
    background: #fff5e8;
    flex-shrink: 0;
}
.mobile-auth .auth-open-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: #2b2725;
    color: #fff7f1 !important;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .2s ease;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}
.mobile-auth .auth-open-btn:hover {
    background: #4a423e;
}

/* Main Content */
.site-main {
    padding: 40px 0;
}

.content-area {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.post-thumbnail {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}


.post-content {
    padding: 20px;
}

.post-title {
    font-size: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-title a {
    color: #2b2725;
}

.post-title a:hover {
    color: #4a423e;
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

/* Single Post */

.single-post .post-header {
    margin-bottom: 30px;
}

.single-post .post-title {
    font-size: 32px;
    margin-bottom: 20px;
}

.single-post .post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.single-post .post-content h2 {
    font-size: 24px;
    margin: 30px 0 15px;
}

.single-post .post-content p {
    margin-bottom: 20px;
}

/* Gift Product List Widget */
.gift-product-list {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.gift-product-list[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.gift-product-list[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.gift-product-list[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.gift-product-list[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }

.gift-product-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gift-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #e0e0e0;
}

.gift-product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: #f6f6f6;
}

.gift-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gift-product-image .secondary-image {
    opacity: 0;
}

.gift-product-item:hover .gift-product-image .secondary-image {
    opacity: 1;
}

.gift-product-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gift-product-item:hover .gift-product-buttons {
    transform: translateY(0);
}

.gift-product-buttons button,
.gift-product-buttons a {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: #ffc7c7;
    color: #2b2725;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.gift-product-buttons button:hover,
.gift-product-buttons a:hover {
    background: #ffaaaa;
    transform: translateY(-2px);
}

.gift-product-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gift-product-content {
    padding: 20px;
}

.gift-product-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .gift-product-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.gift-product-title a {
    color: #2b2725;
    transition: color 0.3s ease;
}

.gift-product-title a:hover {
    color: #4a423e;
}

.gift-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #c8607a;
}

.gift-product-price del {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    margin-right: 8px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 450px;
    z-index: 9999;
    pointer-events: none;
    transition: visibility 0.3s ease;
}

.cart-sidebar.active {
    pointer-events: auto;
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.cart-sidebar.active .cart-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.cart-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #fff5e8;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.cart-sidebar.active .cart-sidebar-content {
    transform: translateX(0);
}

.cart-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #ffc7c7;
    flex-shrink: 0;
    background: #fff5e8;
}

.cart-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #2b2725;
}

.cart-sidebar-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    outline: none;
}

.cart-sidebar-close:hover {
    color: #333;
}

.cart-sidebar-close:focus,
.cart-sidebar-close:active {
    outline: none !important;
    box-shadow: none !important;
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px 25px 200px 25px;
    position: relative;
}

.cart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.cart-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #2b2725;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

.cart-loading p {
    color: #999;
    font-size: 14px;
}

.cart-items-wrapper {
    display: none;
}

.cart-sidebar.loaded .cart-loading {
    display: none;
}

.cart-sidebar.loaded .cart-items-wrapper {
    display: block;
}

/* Mini Cart (Gift custom classes) */
.gift-mini-cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gift-mini-cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

.gift-mini-cart-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.gift-mini-cart-item:last-child {
    border-bottom: none;
}

.gift-mini-cart-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.gift-cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.gift-mini-cart-item a:not(.gift-remove-item) {
    color: #2b2725;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gift-mini-cart-item a:not(.gift-remove-item):hover {
    color: #4a423e;
}

.gift-item-quantity {
    color: #999;
    font-size: 12px;
    line-height: 1.4;
}

.gift-mini-cart-item .gift-price,
.gift-mini-cart-total .gift-amount {
    color: #2b2725;
    font-weight: 700;
    font-size: 16px;
}

.gift-remove-item {
    position: absolute;
    top: 15px;
    right: 0;
    color: #999;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    text-decoration: none;
}

.gift-remove-item .iconfont { font-size: 18px; }

.gift-remove-item:hover {
    color: #e74c3c;
}

.gift-mini-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    margin: 0;
    border-top: 1px solid #ffc7c7;
    border-bottom: 1px solid #ffc7c7;
    font-size: 18px;
    font-weight: 500;
    background: #fff5e8;
    position: absolute;
    bottom: 160px;
    left: 0;
    right: 0;
    z-index: 11;
}

.gift-mini-cart-total strong {
    color: #2b2725;
    text-transform: uppercase;
    font-weight: 500;
}

.gift-mini-cart-total .amount {
    color: #2b2725;
    font-size: 20px;
    font-weight: 700;
}

.gift-mini-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 20px 25px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff5e8;
    border-top: 1px solid #ffc7c7;
}

.gift-mini-cart-buttons .gift-btn-checkout,
.gift-mini-cart-buttons .gift-btn-view-cart {
    display: block;
    padding: 14px 20px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    color: #fff7f1 !important;
}

.gift-mini-cart-buttons .gift-btn-checkout {
    background: #ff9191;
    color: #fff7f1 !important;
    order: 2;
}

.gift-mini-cart-buttons .gift-btn-checkout:hover {
    background: #ff7c7c;
    color: #fff7f1 !important;
}

.gift-mini-cart-buttons .gift-btn-view-cart {
    background: #ffaaaa;
    color: #2b2725 !important;
    border: none;
    order: 1;
}

.gift-mini-cart-buttons .gift-btn-view-cart:hover {
    background: #ff9191;
    color: #fff7f1 !important;
}

 
/* Newsletter Section */
.footer-newsletter {
    display: none;
    background: #f5e6e8;
    padding: 60px 0;
}

.newsletter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter-title {
    font-size: 24px;
    font-weight: 400;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.newsletter-form {
    display: flex;
    gap: 0;
    flex: 1;
    max-width: 600px;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: #fff;
    font-size: 15px;
    color: #999;
    outline: none;
}

.newsletter-form input[type="email"]::placeholder {
    color: #999;
}

.newsletter-btn {
    padding: 16px 40px;
    background: #2b2725;
    color: #fff7f1;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #4a423e;
}

/* Footer Main */
.footer-main {
    background: #ffc7c7;
    padding: 60px 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo-col {
    gap: 20px;
    --footer-logo-width: 150px;
}

.footer-logo img {
    max-width: var(--footer-logo-width);
    height: auto;
}

.footer-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: rgb(43, 39, 37);
    font-family: 'Amatic SC', cursive;
}

.footer-description {
    color: rgb(43, 39, 37);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    max-width: 350px;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu li a {
    color: rgb(43, 39, 37);
    font-size: 18px;
    font-family: 'Amatic SC', cursive;
    transition: color 0.3s ease;
}

.footer-menu li a:hover {
    color: #4a423e;
}

/* Footer Social */
.footer-social {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(43, 39, 37);
    font-size: 24px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #4a423e;
}

/* Footer Bottom */
.footer-bottom {
    background: #ffc7c7;
    padding: 30px 0;
    border-top: 1px solid #ffe8e8;
}

.footer-copyright {
    text-align: center;
    color: rgb(43, 39, 37);
    font-size: 14px;
    margin: 0;
}

.footer-copyright a {
    color: rgb(43, 39, 37);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-copyright a:hover {
    color: #4a423e;
}

/* Auth modal */
.auth-modal { position: fixed; inset: 0; z-index: 10000; display: none; align-items: center; justify-content: center; }
.auth-modal.active { display: flex; }
.auth-modal-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }
.auth-modal-content { position: relative; max-width: 440px; width: 90%; background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); overflow: hidden; animation: modalSlideIn 0.3s ease; }
@keyframes modalSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.auth-modal-close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,0.9); width: 32px; height: 32px; border: 0; border-radius: 50%; font-size: 18px; cursor: pointer; color: #666; transition: all 0.2s; z-index: 1; display: flex; align-items: center; justify-content: center; outline: none; }
.auth-modal-close:focus,
.auth-modal-close:active { outline: none !important; box-shadow: none !important; }
.auth-modal-close:hover { background: #fff; color: #333; transform: rotate(90deg); }
.auth-modal-header { padding: 30px 24px 24px; background: linear-gradient(135deg, #dfbca7 0%, #d4a992 100%); position: relative; }
.auth-tabs { display: flex; gap: 0; background: rgba(255,255,255,0.4); border-radius: 12px; padding: 4px; }
.auth-tab { flex: 1; padding: 12px 20px; background: transparent; color: #333; border: 0; border-radius: 10px; cursor: pointer; transition: all 0.3s; font-size: 15px; font-weight: 400; text-align: center; outline: none; }
.auth-tab:focus,
.auth-tab:active { outline: none !important; box-shadow: none !important; }
.auth-tab.active { background: #fff; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.auth-modal-body { padding: 30px 24px; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form label { display: block; margin-bottom: 18px; }
.auth-form label span { display: block; font-size: 13px; color: #333; margin-bottom: 8px; font-weight: 400; }
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] { width: 100%; padding: 14px 16px; border: 2px solid #f0f0f0; border-radius: 10px; font-size: 15px; transition: all 0.3s; background: #f6f6f6; color: #333; font-weight: 400; }
.auth-form input:focus { outline: none; border-color: #2b2725; background: #fff; box-shadow: 0 0 0 4px rgba(43, 39, 37, 0.1); }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; margin-bottom: 20px; font-weight: 400; }
.auth-remember input[type="checkbox"] { width: auto; outline: none; }
.auth-remember input[type="checkbox"]:focus { outline: none; box-shadow: none; }
.auth-submit { display: block; width: 100%; padding: 16px 18px; background: #2b2725; color: #fff7f1; border: 0; border-radius: 12px; cursor: pointer; font-size: 16px; font-weight: 700; transition: all 0.3s; outline: none; }
.auth-submit:focus,
.auth-submit:active { outline: none !important; box-shadow: 0 8px 16px rgba(43, 39, 37, 0.4) !important; }
.auth-submit:hover { background: #4a423e; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(43, 39, 37, 0.4); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.auth-error { color: #e74c3c; margin-bottom: 15px; font-size: 13px; padding: 12px; background: #ffe2e2; border-radius: 8px; border-left: 3px solid #e74c3c; display: none; }
.auth-error:not(:empty) { display: block; }
.auth-success { color: #27ae60; margin-bottom: 15px; font-size: 13px; padding: 12px; background: #d4edda; border-radius: 8px; }

/* Responsive Design */
@media (max-width: 992px) {
    .gift-product-list[data-columns="4"],
    .gift-product-list[data-columns="5"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gift-product-list {
        gap: 20px;
    }
    
    .gift-product-list[data-columns-mobile="1"] {
        grid-template-columns: 1fr;
    }
    
    .gift-product-list[data-columns-mobile="2"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Related products mobile: always 2 columns */
    .related.products .gift-product-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .gift-product-content {
        padding: 10px;
    }
    
    .gift-product-title {
        font-size: 14px;
        margin: 0 0 8px;
    }
    
    .gift-product-buttons button,
    .gift-product-buttons a {
        font-size: 10px;
        padding: 10px 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .cart-sidebar {
        max-width: 100%;
    }
    
    .cart-sidebar-body {
        padding: 20px;
    }
    
    .gift-mini-cart-item img {
        width: 60px;
        height: 60px;
    }
    
    .cart-sidebar-body {
        padding: 20px 20px 200px 20px;
    }
}

@media (max-width: 992px) {
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    .header-main {
    padding:6px 0
    }
    .footer-logo-col {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-newsletter {
        padding: 40px 10px;
    }
    
    .newsletter-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .newsletter-title {
        font-size: 18px;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .newsletter-form input[type="email"] {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .newsletter-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .footer-main {
        padding: 40px 0;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
    }
    
    .footer-logo-col {
        padding-bottom: 30px;
    }
    
    /* Hide footer menus on mobile */
    .footer-column:not(.footer-logo-col) {
        display: none;
    }
    
    .footer-menu {
        align-items: center;
    }
    
    .footer-bottom {
        padding: 20px 10px;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .site-logo {
        --logo-width: var(--logo-width-mobile, 120px);
    }
    
    .main-navigation {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-icons {
        gap: 10px;
    }

    .header-icon {
        font-size: 23px; /* unify mobile icons */
    }
    .mobile-menu-toggle {
        font-size: 23px;
    }
    .header-icon .iconfont,
    .mobile-menu-toggle .iconfont {
        font-size: inherit !important;
        line-height: 1;
    }
    /* hide user icon on mobile; use sidebar button */
    .header-icon.user-icon,
    #authOpenDesktop { 
        display: none !important; 
    }

    /* Mobile search box optimization */
    .search-box {
        padding: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: none;
    }
    .search-box.active {
        padding: 24px 0;
        max-height: 300px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .search-form {
        flex-direction: column;
        gap: 12px;
        border: 0;
        border-radius: 0;
        overflow: visible;
        background: transparent;
    }
    .search-form input[type="search"] {
        padding: 14px 18px;
        font-size: 15px;
        border: 2px solid #f0f0f0;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    .search-form input[type="search"]:focus {
        border-color: #ffc7c7;
        box-shadow: 0 0 0 4px rgba(255, 199, 199, 0.3);
    }
    .search-form button {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(255, 145, 145, 0.4);
    }
    .search-form button:active {
        transform: scale(0.98);
    }

    /* Mobile auth modal - slide up from bottom */
    .auth-modal { align-items: flex-end; }
    .auth-modal-content { 
        max-width: 100%; 
        width: 100%; 
        margin: 0;
        border-radius: 20px 20px 0 0;
        animation: modalSlideUp 0.3s ease;
        max-height: 90vh;
        overflow-y: auto;
    }
    @keyframes modalSlideUp { 
        from { transform: translateY(100%); } 
        to { transform: translateY(0); } 
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .single-post {
        padding: 20px;
    }

    .single-post .post-title {
        font-size: 24px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #2b2725;
    color: #fff7f1;
    border-color: #2b2725;
}

.pagination .current {
    background: #2b2725;
    color: #fff7f1;
    border-color: #2b2725;
}

.pagination .dots {
    padding: 0 10px;
    color: #999;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation a {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    background: #fceacc;
    transform: translateX(5px);
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 13px;
    color: #999;
    margin-bottom: 5px;
}

.post-navigation .nav-title {
    display: block;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: #2b2725;
    color: #fff7f1 !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: #4a423e;
    transform: translateX(5px);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.page-header .page-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #2b2725;
}

.page-header .archive-description {
    color: #666;
    font-size: 16px;
}

/* Post Tags and Categories */
.post-tags,
.post-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.post-tags a {
    display: inline-block;
    padding: 5px 15px;
    margin: 5px 5px 5px 0;
    background: #f0f0f0;
    color: #666;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.post-tags a:hover {
    background: #2b2725;
    color: #fff7f1;
}

/* Cart Count Badge */
.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #fceacc;
    color: #2b2725;
    font-size: 11px;
    border-radius: 9px;
    font-weight: bold;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2b2725;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.no-results h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.no-results p {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #2b2725;
    color: #fff7f1;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(43, 39, 37, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #4a423e;
    transform: translateY(-5px);
}

/* Screen Reader Text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Breadcrumb */
.gift-breadcrumb-wrapper {
    padding: 15px 0;
    background: #fff5e8;
    border-bottom: 1px solid #ffdfdf;
}

.gift-breadcrumb,
.woocommerce-breadcrumb {
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.woocommerce-breadcrumb a {
    color: #666;
    transition: color 0.3s ease;
}

.woocommerce-breadcrumb a:hover {
    color: #2b2725;
}

.woocommerce-breadcrumb .breadcrumb-separator {
    color: #ccc;
    margin: 0 4px;
}

@media (max-width: 768px) {
    .gift-breadcrumb,
    .woocommerce-breadcrumb {
        font-size: 11px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Accessibility */
*:focus,
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-sidebar,
    .mobile-sidebar-overlay,
    .search-box,
    .back-to-top {
        display: none !important;
    }
}

