/*
Theme Name: Throne Child
Template: throne
Author: Gerard
Version: 1.0
Description: A child theme for Throne.
*/

/* Force the drawer and items to stay Left-to-Right */
#cart-drawer, 
.cart-item, 
.cart-item-actions,
.cart-item-details {
    direction: ltr !important;
    text-align: left !important;
}

/* Fix the button row alignment */
.cart-item-actions {
    display: flex !important;
    flex-direction: row !important; /* Forces buttons to stay side-by-side */
    justify-content: flex-start !important;
    gap: 8px !important;
}

/* Ensure the title doesn't float to the right */
.cart-item strong {
    float: none !important;
    display: block !important;
}

#cart-fab {
    position: fixed;
    bottom: 40px;
    right: 20px;
    background: black;
    color: white;
    border: none;
    padding: 14px 16px;
    border-radius: 50px;
	box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    font-size: 16px;
    cursor: pointer;
    z-index: 9999;
}

#cart-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

#cart-count {
    background: red;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 6px;
    font-size: 12px;
}

#cart-drawer {
	position: fixed;
    top: 0;
    right: 0;
    width: 360px;
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 20px;

    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#cart-drawer.open {
    transform: translateX(0);
}

.add-to-cart {
    background: #111;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;

    transition: 0.2s ease;
}

.add-to-cart:hover {
    background: #333;
    transform: translateY(-1px);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cart-items {
    margin-top: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    direction: ltr !important;
    text-align: left;
}

.cart-item strong {
    font-size: 16px;
    color: #111;
    display: block;
    width: 100%;
}

.cart-item-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.cart-item-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.qty {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
	cursor: pointer;
	margin: 0 5px;
}

.qty-btn {
    background: #f4f4f4;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.cart-item-btns [data-action="remove"] {
    margin-left: auto;
    color: #cc0000;
    border-color: #ffcccc;
    background: #fff5f5;
}

.cart-total-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #333;
    text-align: right;
    font-size: 18px;
}

#checkout-btn {
    width: 100%;
    background: #25D366;
    color: white;
    padding: 14px;
    border: none;
    margin-top: 15px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: bold;

    transition: 0.2s;
}

#checkout-btn:hover {
    background: #1ebe5d;
}

.content-layout {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.shop-item {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.shop-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.shop-item input,
.shop-item select {
    width: 100%;
    padding: 6px;
}

.product-slider {
    position: relative !important;
    width: 100%;
    margin-bottom: 10px;
}

.main-image img {
    display: block;
    width: 100%;
    height: auto;
}

.slider-btn {
	direction: ltr !important;
    transition: opacity 0.3s ease, background 0.2s;
    top: 50%;
    transform: translateY(-50%);
	display: flex !important;
    opacity: 0;
    z-index: 9999 !important;
    position: absolute !important;
    background: rgba(0,0,0,0.7) !important;
    color: white;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev { left: 5px; border-radius: 4px; right: auto !important; }
.next { right: 5px; border-radius: 4px; left: auto !important; }

.shop-item:hover .slider-btn {
    opacity: 1;
}

.whatsapp-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 8px;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    background: #25D366;
    color: #fff;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

    transition:
        background 0.25s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.whatsapp-btn:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.whatsapp-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 8px;

    background: url('https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg') no-repeat center;
    background-size: contain;
    filter: brightness(0) invert(1);
}

/* Active (click) */
.whatsapp-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* Focus (keyboard accessibility) */
.whatsapp-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

/* Optional: subtle press effect on mobile */
@media (hover: none) {
    .whatsapp-btn:hover {
        transform: none;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    }
}

@media (max-width: 768px) {
    .content-layout {
        margin: 30px auto;
        gap: 20px;
    }
}