/* Reset and basic styling for iframe */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.pinsonandtang-body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    padding: 15px;
}

.pinsonandtang-widget-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pinsonandtang-widget-header {
    background: #6f417a;
    color: white;
    padding: 15px;
    text-align: left;
    font-size: 18px;
    font-weight: bold;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* .pinsonandtang-header-title {
    flex: 1;
} */

.pinsonandtang-header-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pinsonandtang-menu-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 7px 13px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.pinsonandtang-menu-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pinsonandtang-menu-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pinsonandtang-cart-count {
    background: #dc2626;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 5px;
}

.pinsonandtang-products-grid,
.pinsonandtang-cart-view {
    padding: 20px;
}

.pinsonandtang-cart-view {
    display: none;
}

.pinsonandtang-product-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pinsonandtang-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pinsonandtang-product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.pinsonandtang-product-name {
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.3;
}

.pinsonandtang-product-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.pinsonandtang-product-price {
    font-size: 20px;
    font-weight: bold;
    color: #6f417a;
    margin-bottom: 12px;
}

.pinsonandtang-add-to-cart-btn {
    background: #6f417a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    transition: background 0.2s;
}

.pinsonandtang-add-to-cart-btn:hover {
    background: #6f417a;
}

.pinsonandtang-add-to-cart-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.pinsonandtang-cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

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

.pinsonandtang-cart-pinsonandtang-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 15px;
}

.pinsonandtang-cart-pinsonandtang-item-details {
    flex: 1;
}

.pinsonandtang-cart-item-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.pinsonandtang-cart-item-price {
    color: #6f417a;
    font-weight: bold;
}

.pinsonandtang-cart-item-quantity {
    margin-left: 10px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pinsonandtang-quantity-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
}

.pinsonandtang-quantity-btn {
    background: #6f417a;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pinsonandtang-quantity-btn:hover {
    background: #6f417a;
}

.pinsonandtang-quantity-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.pinsonandtang-quantity-display {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.pinsonandtang-remove-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.pinsonandtang-cart-total {
    background: #f8fafc;
    padding: 15px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    color: #1f2937;
}

.pinsonandtang-checkout-btn {
    background: #6f417a;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    margin-top: 10px;
}

.pinsonandtang-checkout-btn:hover {
    background: #6f417a;
}

.pinsonandtang-view-cart-btn {
    background: #6f417a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pinsonandtang-view-cart-btn:hover {
    background: #6f417a;
    text-decoration: none;
    color: white;
}

.pinsonandtang-empty-cart {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

.pinsonandtang-api-key-info {
    background: #e0f2fe;
    padding: 8px 15px;
    font-size: 11px;
    color: #6f417a;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.pinsonandtang-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pinsonandtang-header-title img {
    padding: 10px 50px 5px 10px;
    width: 100%;
    /* reduce width a bit */
    max-width: 300px;
    /* prevent it from being too large on big screens */
    height: auto;
    /* maintain aspect ratio */
    object-fit: contain;
    /* fit inside container */
    margin: 0 auto;
    /* center horizontally */
    display: block;
}

.pinsonandtang-header-menu {
    /* display: flex; */
    gap: 10px;
    align-items: center;
    /* flex-wrap: wrap; allow wrapping if no space */
    /* justify-content: flex-end; */
}

.pinsonandtang-checkout-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pinsonandtang-checkout-header {
    background: linear-gradient(135deg, #6f417a, #6f417a);
    color: white;
    padding: 20px;
    text-align: center;
}

.pinsonandtang-checkout-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.pinsonandtang-checkout-subtitle {
    opacity: 0.9;
    font-size: 14px;
}

.pinsonandtang-checkout-content {
    padding: 25px;
}

.pinsonandtang-section {
    margin-bottom: 25px;
}

.pinsonandtang-section-title {
    font-size: 18px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pinsonandtang-order-summary  {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.pinsonandtang-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.pinsonandtang-summary-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 16px;
    color: #059669;
    margin-top: 5px;
    padding-top: 10px;
}

.pinsonandtang-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pinsonandtang-item-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.pinsonandtang-form-group {
    margin-bottom: 15px;
}

.pinsonandtang-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.pinsonandtang-form-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.pinsonandtang-form-input:focus {
    outline: none;
    border-color: #6f417a;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pinsonandtang-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.pinsonandtang-payment-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.pinsonandtang-payment-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.pinsonandtang-payment-option:hover {
    border-color: #6f417a;
    background-color: #f8fafc;
}

.pinsonandtang-payment-option.selected {
    border-color: #6f417a;
    background-color: #eff6ff;
}

.pinsonandtang-payment-radio {
    margin-right: 10px;
}

.pinsonandtang-payment-label {
    font-weight: 500;
    color: #1f2937;
}

.pinsonandtang-checkout-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.pinsonandtang-btn-primary {
    background: #6f417a;
    color: white;
    flex: 1;
}

.pinsonandtang-btn-primary:hover {
    background: #6f417a;
    transform: translateY(-1px);
}

.pinsonandtang-btn-secondary {
    background: #6b7280;
    color: white;
    flex: 0 0 auto;
}

.pinsonandtang-btn-secondary:hover {
    background: #4b5563;
    text-decoration: none;
    color: white;
}

.pinsonandtang-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pinsonandtang-success-message {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.pinsonandtang-error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

@media (max-width: 768px) {
    .pinsonandtang-body {
        padding: 10px;
    }

    .pinsonandtang-checkout-actions {
        flex-direction: column;
    }

    .pinsonandtang-payment-methods {
        grid-template-columns: 1fr;
    }
}
/* Optional: further tweak on very small screens */
@media (max-width: 500px) {
    .pinsonandtang-menu-btn {
   
    color: white;
    padding: 3px 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
    .pinsonandtang-header-title img {
        padding: 11px 0px 3px 0px;
        width: 100%;
        max-width: 200px;
    }

    .pinsonandtang-cart-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pinsonandtang-cart-item-quantity {
        margin-left: 0;
        margin-top: 10px;
    }

    .pinsonandtang-header-menu {
        /* flex-direction: column; */
        margin-left: 10px;
        align-items: stretch;
        /* width: 100%;
        margin-top: 10px; */
    }

    .pinsonandtang-menu-btn {
        width: 100%;
        justify-content: center;
    }

    .pinsonandtang-widget-header {
        /* flex-direction: column; */
        align-items: center;
        text-align: center;
    }

    .pinsonandtang-header-title {
        margin-bottom: 10px;
    }
}
