/* ===========================
   Our Happy Tree Shop Styles
   =========================== */

/* Products Grid */
.oht-shop {
    position: relative;
    padding: 20px 0;
}

.oht-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Category Filters */
.oht-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.oht-category-btn {
    background: transparent;
    color: #2d3e50;
    border: 2px solid #ddd;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oht-category-btn:hover {
    border-color: #29abe2;
    color: #29abe2;
}

.oht-category-btn.active {
    background: #f7941d;
    border-color: #f7941d;
    color: #fff;
}

/* Product Card */
.oht-product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.oht-product-card:hover {
    transform: translateY(-4px);
}

.oht-product-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* ── Product image carousel ── */
.oht-product-carousel {
    position: relative;
    overflow: hidden;
}

.oht-carousel-track {
    display: flex;
    transition: transform 0.35s ease;
    will-change: transform;
}

.oht-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.oht-carousel-slide img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.oht-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.18);
    transition: background 0.15s;
    z-index: 2;
    padding: 0;
}

.oht-carousel-arrow:hover {
    background: #fff;
}

.oht-carousel-prev { left: 8px; }
.oht-carousel-next { right: 8px; }

.oht-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.oht-carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    transition: background 0.2s;
    cursor: pointer;
}

.oht-carousel-dot.active {
    background: #fff;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,0.25);
}

.oht-product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.oht-product-info h3 {
    color: #2d3e50;
    font-size: 18px;
    margin: 0 0 10px;
}

.oht-product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Variations */
.oht-product-variations {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.oht-size-selector,
.oht-color-selector {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #2d3e50;
    background: #fff;
    cursor: pointer;
    appearance: auto;
}

.oht-size-selector:focus,
.oht-color-selector:focus {
    outline: none;
    border-color: #29abe2;
}

.oht-select-error {
    border-color: #e53935 !important;
}

.oht-variation-error {
    color: #e53935;
    font-size: 12px;
    margin: -4px 0 8px;
}

/* Price + button pinned to bottom */
.oht-product-footer {
    margin-top: auto;
}

.oht-product-price {
    color: #f7941d;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Add to Cart Button */
.oht-add-to-cart {
    background: #f7941d;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s ease;
}

.oht-add-to-cart:hover {
    background: #e8820a;
}

/* Cart Icon */
.oht-cart-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #29abe2;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(41,171,226,0.4);
    z-index: 9999;
    transition: transform 0.2s ease;
}

.oht-cart-icon:hover {
    transform: scale(1.05);
}

.oht-cart-emoji {
    font-size: 22px;
}

.oht-cart-count {
    background: #f7941d;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* Cart Drawer */
.oht-cart-drawer {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 99999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.oht-cart-drawer.open {
    right: 0;
}

.oht-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.oht-cart-header h3 {
    color: #2d3e50;
    margin: 0;
    font-size: 20px;
}

.oht-cart-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.oht-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.oht-cart-empty {
    color: #888;
    text-align: center;
    margin-top: 40px;
}

.oht-cart-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.oht-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.oht-cart-item-info {
    flex: 1;
}

.oht-cart-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3e50;
    margin-bottom: 4px;
}

.oht-cart-item-price {
    color: #f7941d;
    font-size: 14px;
    font-weight: 600;
}

.oht-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.oht-qty-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oht-qty-display {
    font-size: 14px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.oht-remove-item {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
    margin-left: auto;
}

.oht-remove-item:hover {
    color: #e53935;
}

/* Cart Footer */
.oht-cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.oht-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #2d3e50;
    margin-bottom: 8px;
}

.oht-cart-grand-total {
    font-size: 18px;
    font-weight: 700;
    color: #2d3e50;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.oht-cart-weight-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

.oht-shipping-message {
    font-size: 13px;
    color: #6a5acd;
    background: #f3f0ff;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
}

.oht-free-shipping {
    color: #2e7d32;
    font-weight: 700;
}

.oht-checkout-btn {
    background: #29abe2;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: background 0.2s ease;
}

.oht-checkout-btn:hover {
    background: #1a9fd4;
}

/* Overlay */
.oht-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}

.oht-overlay.active {
    display: block;
}

/* Modal */
.oht-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    z-index: 999999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.oht-modal.open {
    display: block;
}

.oht-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
}

.oht-modal-header h3 {
    color: #2d3e50;
    margin: 0;
    font-size: 20px;
}

.oht-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.oht-modal-body {
    padding: 24px;
}

/* Checkout Form */
.oht-checkout-section h4 {
    color: #2d3e50;
    font-size: 16px;
    margin: 0 0 16px;
}

.oht-checkout-section input,
.oht-checkout-section textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 12px;
    color: #2d3e50;
    box-sizing: border-box;
}

.oht-checkout-section input:focus,
.oht-checkout-section textarea:focus {
    outline: none;
    border-color: #29abe2;
}

.oht-checkout-section textarea {
    height: 80px;
    resize: vertical;
}

.oht-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.oht-form-row input {
    margin-bottom: 0;
}

/* Buttons */
.oht-btn-primary {
    background: #f7941d;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: background 0.2s ease;
}

.oht-btn-primary:hover {
    background: #e8820a;
}

.oht-btn-secondary {
    background: transparent;
    color: #29abe2;
    border: 2px solid #29abe2;
    border-radius: 25px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oht-btn-secondary:hover {
    background: #29abe2;
    color: #fff;
}

.oht-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.oht-btn-row .oht-btn-primary {
    margin-top: 0;
}

/* Order Summary */
.oht-order-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Payment Element */
#oht-payment-element {
    margin: 16px 0;
}

/* Payment notice */
.oht-payment-notice {
    color: #888;
    font-size: 12px;
    text-align: center;
    margin: 8px 0 4px;
}

/* Error */
.oht-error {
    color: #e53935;
    font-size: 13px;
    margin-top: 8px;
    min-height: 20px;
}

/* Success */
.oht-success {
    text-align: center;
    padding: 20px 0;
}

.oht-success-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.oht-success h4 {
    color: #2d3e50;
    font-size: 24px;
    margin-bottom: 12px;
}

.oht-success p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.oht-success-sub {
    color: #888;
    font-size: 13px;
    margin-top: 16px;
}

/* Mobile */
@media (max-width: 768px) {
    .oht-cart-drawer {
        width: 100%;
        right: -100%;
    }

    .oht-products {
        grid-template-columns: 1fr;
    }

    .oht-modal {
        width: 95%;
    }
}